mirror of
https://github.com/hyprwm/hyprpaper.git
synced 2024-11-16 22:25:59 +01:00
Nix: add commit hash
This commit is contained in:
parent
728243cef0
commit
1e1fc79d84
2 changed files with 7 additions and 0 deletions
|
@ -35,6 +35,7 @@
|
||||||
hyprpaper = final.callPackage ./nix/default.nix {
|
hyprpaper = final.callPackage ./nix/default.nix {
|
||||||
stdenv = final.gcc13Stdenv;
|
stdenv = final.gcc13Stdenv;
|
||||||
version = "0.pre" + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
|
version = "0.pre" + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
|
||||||
|
commit = self.rev or "";
|
||||||
inherit (final.xorg) libXdmcp;
|
inherit (final.xorg) libXdmcp;
|
||||||
inherit (inputs.hyprlang.packages.${final.system}) hyprlang;
|
inherit (inputs.hyprlang.packages.${final.system}) hyprlang;
|
||||||
};
|
};
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
wayland-protocols,
|
wayland-protocols,
|
||||||
wayland-scanner,
|
wayland-scanner,
|
||||||
libXdmcp,
|
libXdmcp,
|
||||||
|
commit,
|
||||||
debug ? false,
|
debug ? false,
|
||||||
version ? "git",
|
version ? "git",
|
||||||
}:
|
}:
|
||||||
|
@ -32,6 +33,11 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
src = ../.;
|
src = ../.;
|
||||||
|
|
||||||
|
prePatch = ''
|
||||||
|
substituteInPlace src/main.cpp \
|
||||||
|
--replace GIT_COMMIT_HASH '"${commit}"'
|
||||||
|
'';
|
||||||
|
|
||||||
cmakeBuildType =
|
cmakeBuildType =
|
||||||
if debug
|
if debug
|
||||||
then "Debug"
|
then "Debug"
|
||||||
|
|
Loading…
Reference in a new issue