forked from M-Labs/nix-scripts
flake.nix: include git revCount in version
This commit is contained in:
parent
cd4a8fce8a
commit
b17c7ad7b5
44
flake.lock
44
flake.lock
|
@ -5,15 +5,15 @@
|
|||
"locked": {
|
||||
"lastModified": 1614493604,
|
||||
"narHash": "sha256-9P/O4SWHqHWO+OD3d8FihJXQ+Y5JRlW0ajBNYZlIZUg=",
|
||||
"owner": "M-Labs",
|
||||
"repo": "artiq",
|
||||
"ref": "master",
|
||||
"rev": "b8f4c6b9bb8ce4f2d7dc50e87690ad336841357c",
|
||||
"type": "github"
|
||||
"revCount": 7585,
|
||||
"type": "git",
|
||||
"url": "https://github.com/M-Labs/artiq.git"
|
||||
},
|
||||
"original": {
|
||||
"owner": "M-Labs",
|
||||
"repo": "artiq",
|
||||
"type": "github"
|
||||
"type": "git",
|
||||
"url": "https://github.com/M-Labs/artiq.git"
|
||||
}
|
||||
},
|
||||
"artiq-legacy-src": {
|
||||
|
@ -21,16 +21,16 @@
|
|||
"locked": {
|
||||
"lastModified": 1613549523,
|
||||
"narHash": "sha256-FgX/W+y8N4/6DLLTJuJVg5gUr3zk/5DxmSIxA4I6ZvE=",
|
||||
"owner": "M-Labs",
|
||||
"repo": "artiq",
|
||||
"ref": "release-5",
|
||||
"rev": "10c9842fc8844b524811336c6a529c648a2d2fde",
|
||||
"type": "github"
|
||||
"revCount": 7153,
|
||||
"type": "git",
|
||||
"url": "https://github.com/M-Labs/artiq.git"
|
||||
},
|
||||
"original": {
|
||||
"owner": "M-Labs",
|
||||
"ref": "release-5",
|
||||
"repo": "artiq",
|
||||
"type": "github"
|
||||
"type": "git",
|
||||
"url": "https://github.com/M-Labs/artiq.git"
|
||||
}
|
||||
},
|
||||
"artiq-src": {
|
||||
|
@ -38,16 +38,16 @@
|
|||
"locked": {
|
||||
"lastModified": 1613555154,
|
||||
"narHash": "sha256-D/43YVvMNkcXV6sBBxAqxcmtEO3TagIQEQl0zsGE+ag=",
|
||||
"owner": "M-Labs",
|
||||
"repo": "artiq",
|
||||
"ref": "release-6",
|
||||
"rev": "c22482787ef806eb8e48d59b6ded7d93c7677c81",
|
||||
"type": "github"
|
||||
"revCount": 7582,
|
||||
"type": "git",
|
||||
"url": "https://github.com/M-Labs/artiq.git"
|
||||
},
|
||||
"original": {
|
||||
"owner": "M-Labs",
|
||||
"ref": "release-6",
|
||||
"repo": "artiq",
|
||||
"type": "github"
|
||||
"type": "git",
|
||||
"url": "https://github.com/M-Labs/artiq.git"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
|
@ -78,11 +78,11 @@
|
|||
"sinara-systems": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1614310919,
|
||||
"narHash": "sha256-hHHEAUMbwATSExViuGM5foGt29Aq0Xwc0uDNF/x5Kt0=",
|
||||
"lastModified": 1615195806,
|
||||
"narHash": "sha256-UfsPJxvERsGiECOFC+sjmk4r61aWepF0nXqRgnmLR80=",
|
||||
"ref": "master",
|
||||
"rev": "52141a3fef08ee88227c48395bc8e32b5140c938",
|
||||
"revCount": 200,
|
||||
"rev": "1f0605f46cc7cbfcdf427f15a93e0e4a75d0d491",
|
||||
"revCount": 202,
|
||||
"type": "git",
|
||||
"url": "https://git.m-labs.hk/M-Labs/sinara-systems.git"
|
||||
},
|
||||
|
|
10
flake.nix
10
flake.nix
|
@ -7,15 +7,15 @@
|
|||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/release-20.09";
|
||||
artiq-beta-src = {
|
||||
url = "github:M-Labs/artiq";
|
||||
url = "git+https://github.com/M-Labs/artiq.git";
|
||||
flake = false;
|
||||
};
|
||||
artiq-src = {
|
||||
url = "github:M-Labs/artiq/release-6";
|
||||
url = "git+https://github.com/M-Labs/artiq.git?ref=release-6";
|
||||
flake = false;
|
||||
};
|
||||
artiq-legacy-src = {
|
||||
url = "github:M-Labs/artiq/release-5";
|
||||
url = "git+https://github.com/M-Labs/artiq.git?ref=release-5";
|
||||
flake = false;
|
||||
};
|
||||
sinara-systems = {
|
||||
|
@ -37,7 +37,7 @@
|
|||
|
||||
artiq-fast-src =
|
||||
let
|
||||
inherit (sources.${artiqInputName}) lastModified rev narHash;
|
||||
inherit (sources.${artiqInputName}) lastModified rev revCount narHash;
|
||||
hash = builtins.replaceStrings ["sha256-"] [""] narHash;
|
||||
|
||||
artiqSrc = sources.${artiqInputName}.outPath;
|
||||
|
@ -60,7 +60,7 @@
|
|||
sha256 = "${hash}";
|
||||
}
|
||||
EOF
|
||||
echo "{ stdenv, git, fetchgit }: \"$MAJOR_VERSION.`cut -c1-8 <<< ${rev}`$SUFFIX\"" > $out/pkgs/artiq-version.nix
|
||||
echo "{ stdenv, git, fetchgit }: \"$MAJOR_VERSION.${toString revCount}.`cut -c1-8 <<< ${rev}`$SUFFIX\"" > $out/pkgs/artiq-version.nix
|
||||
echo "{ stdenv, git, fetchgit }: \"${toString lastModified}\"" > $out/pkgs/artiq-timestamp.nix
|
||||
'';
|
||||
artiq-fast =
|
||||
|
|
Loading…
Reference in New Issue