Skip to content

Commit

Permalink
Merge pull request #154 from a-kenji/version/add
Browse files Browse the repository at this point in the history
Add version specifiers to unstable version
  • Loading branch information
a-kenji authored Sep 4, 2024
2 parents ab3ec02 + 65d3a86 commit c956f25
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions nix/flake-edit.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
let
cargoTOML = builtins.fromTOML (builtins.readFile (self + "/Cargo.toml"));
inherit (cargoTOML.package) version name;
pname = name;
gitDate = "${builtins.substring 0 4 self.lastModifiedDate}-${
builtins.substring 4 2 self.lastModifiedDate
}-${builtins.substring 6 2 self.lastModifiedDate}";
Expand All @@ -21,8 +22,7 @@ let
pkg-config
openssl
];
inherit version name;
pname = name;
inherit version name pname;
src = lib.cleanSourceWith { src = craneLib.path ../.; };
};
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
Expand All @@ -32,7 +32,7 @@ let
cargoDoc = craneLib.cargoDoc (commonArgs // { inherit cargoArtifacts; });
cargoTest = craneLib.cargoNextest (commonArgs // { inherit cargoArtifacts; });
assetDir = "target/assets";
postInstall = name: ''
postInstall = ''
# install the manpage
installManPage ${assetDir}/${name}.1
# explicit behavior
Expand All @@ -58,11 +58,15 @@ in
ASSET_DIR = assetDir;
};
doCheck = false;
version = "unstable-" + gitDate;
pname = "flake-edit";
name = "flake-edit";
postInstall = postInstall "flake-edit";
inherit assetDir cargoArtifacts meta;
version = version + "-unstable-" + gitDate;
inherit
name
pname
postInstall
assetDir
cargoArtifacts
meta
;
}
);
inherit
Expand Down

0 comments on commit c956f25

Please sign in to comment.