summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkoverstreet <kent.overstreet@gmail.com>2024-06-10 18:30:30 -0400
committerGitHub <noreply@github.com>2024-06-10 18:30:30 -0400
commit786e507c2eeec071ff6f71aebdfc263d5845fed8 (patch)
treed53437a0abffef502fd86e74f662c63ec51e4742
parente743caf71cb1e4e78c80e991139a6f18c6f5ed0c (diff)
parent2a15fc044537a07fec61bf1dc003175309e5b067 (diff)
Merge pull request #295 from tmuehlbacher/flake-stuff
Make nix package builds have a unique version; dev shell addition
-rw-r--r--flake.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/flake.nix b/flake.nix
index 6c379313..e4bc38ea 100644
--- a/flake.nix
+++ b/flake.nix
@@ -66,11 +66,11 @@
craneLib = crane.mkLib pkgs;
- libbcachefsCommit = substring 0 7 (builtins.readFile ./.bcachefs_revision);
+ rev = self.shortRev or self.dirtyShortRev or (substring 0 8 self.lastModifiedDate);
makefileVersion = removePrefix "VERSION=" (
findFirst (line: hasPrefix "VERSION=" line) "VERSION=0.0.0" (split "\n" (readFile ./Makefile))
);
- version = "${makefileVersion}+git-${libbcachefsCommit}";
+ version = "${makefileVersion}+${rev}";
commonArgs = {
inherit version;
@@ -174,6 +174,7 @@
# development, and might need to be version matched with build
# dependencies (e.g. clippy or rust-analyzer).
packages = with pkgs; [
+ bear
cargo-audit
cargo-outdated
clang-tools