Skip to content

Commit

Permalink
nix: fewer rebuilds
Browse files Browse the repository at this point in the history
  • Loading branch information
SomeoneSerge committed Dec 26, 2023
1 parent dd0e12c commit 4522c47
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .devops/nix/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ effectiveStdenv.mkDerivation (
pname = "llama-cpp${pnameSuffix}";
version = llamaVersion;

src = ../../.;
src = lib.cleanSource ../../.;

postPatch = ''
substituteInPlace ./ggml-metal.m \
Expand Down
8 changes: 7 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

Expand Down

0 comments on commit 4522c47

Please sign in to comment.