nix: fewer rebuilds

This commit is contained in:
Someone Serge 2023-12-26 04:05:51 +00:00
parent dd0e12c741
commit 4522c47a22
No known key found for this signature in database
GPG key ID: 7B0E3B1390D61DA4
2 changed files with 8 additions and 2 deletions

View file

@ -112,7 +112,7 @@ effectiveStdenv.mkDerivation (
pname = "llama-cpp${pnameSuffix}";
version = llamaVersion;
src = ../../.;
src = lib.cleanSource ../../.;
postPatch = ''
substituteInPlace ./ggml-metal.m \

View file

@ -18,7 +18,13 @@
outputs =
{ self, flake-parts, ... }@inputs:
let
llamaVersion = self.dirtyShortRev or self.shortRev;
# We could include the git revisions in the package names but those would
# needlessly trigger rebuilds:
# llamaVersion = self.dirtyShortRev or self.shortRev;
# Nix already uses cryptographic hashes for versioning, so we'll just fix
# the fake semver for now:
llamaVersion = "0.0.0";
in
flake-parts.lib.mkFlake { inherit inputs; }