fix(nix): don't add git rev to package version
causes a full deps rebuild each commit 🫠
This commit is contained in:
parent
89390e4f3f
commit
09b4829281
2 changed files with 3 additions and 13 deletions
12
flake.nix
12
flake.nix
|
@ -11,12 +11,7 @@
|
|||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
crane,
|
||||
flake-parts,
|
||||
...
|
||||
}@inputs:
|
||||
{ crane, flake-parts, ... }@inputs:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
|
@ -29,10 +24,7 @@
|
|||
{ self', pkgs, ... }:
|
||||
{
|
||||
packages = {
|
||||
tyrolienne = pkgs.callPackage ./package.nix {
|
||||
inherit self;
|
||||
craneLib = crane.mkLib pkgs;
|
||||
};
|
||||
tyrolienne = pkgs.callPackage ./package.nix { craneLib = crane.mkLib pkgs; };
|
||||
default = self'.packages.tyrolienne;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
self,
|
||||
lib,
|
||||
craneLib,
|
||||
mold-wrapped,
|
||||
|
@ -9,11 +8,10 @@
|
|||
}:
|
||||
let
|
||||
cargoToml = lib.importTOML ./Cargo.toml;
|
||||
rev = self.shortRev or self.dirtyShortRev or "dirty";
|
||||
in
|
||||
craneLib.buildPackage {
|
||||
pname = cargoToml.package.name;
|
||||
version = "${cargoToml.package.version}+git.${rev}";
|
||||
inherit (cargoToml.package) version;
|
||||
|
||||
src = craneLib.cleanCargoSource ./.;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue