Skip to content
Snippets Groups Projects
Commit f9fbcd9c authored by Millian Poquet's avatar Millian Poquet
Browse files

[ci] nix: pin batsim rather than use stable

parent 71763992
No related branches found
No related tags found
No related merge requests found
{
"url": "https://framagit.org/batsim/batsim.git",
"rev": "6cdcd274c31fb11dfed03f2409f059b11c74a4f1",
"date": "2018-07-11T15:59:48+02:00",
"sha256": "1a0knfi935xw84g2lfn1s9fsnyvg00nygdqyyp5mird47gj8c72a",
"fetchSubmodules": true
}
......@@ -12,22 +12,22 @@ let
# Redefine some packages for clarity's sake
batexpe = kapack.batexpe;
batsim_stable = kapack.batsim;
batsim_pinned = kapack.batsim;
batsim_dev = kapack.batsim_dev;
# Packages defined in this tree
batsched_local = callPackage ./local.nix {};
test_deps_stable = callPackage ./test-deps.nix {
batsim = batsim_stable;
test_deps_pinned = callPackage ./test-deps.nix {
batsim = batsim_pinned;
};
test_deps_dev = callPackage ./test-deps.nix {
batsim = batsim_dev;
};
# Packages meant to be used as shells
test_stable = callPackage ./test-env.nix {
test_pinned = callPackage ./test-env.nix {
batsched = batsched_local;
test_deps = test_deps_stable;
test_deps = test_deps_pinned;
};
test_dev = callPackage ./test-env.nix {
batsched = batsched_local;
......
#!/usr/bin/env nix-shell
#! nix-shell . -i bash -A test_deps_dev
if [ "$#" -ne 1 ]; then
echo 'usage: pin-batsim.bash BATSIM-REV'
exit 1
fi
rev=$1
nix-prefetch-git \
--url https://framagit.org/batsim/batsim.git \
--rev ${rev} \
> batsim-pinned.json
{ stdenv, batsim, batexpe,
which, redis, procps, psmisc
which, redis, procps, psmisc,
nix-prefetch-git
}:
stdenv.mkDerivation rec {
......@@ -8,5 +9,8 @@ stdenv.mkDerivation rec {
# This package is not meant to be built
unpackPhase = "true";
installPhase = "true";
propagatedBuildInputs = [ batsim batexpe which redis procps psmisc ];
propagatedBuildInputs = [ batsim batexpe
which redis procps psmisc
nix-prefetch-git
];
}
......@@ -3,5 +3,5 @@
set -eu
# (re)build up-to-date CI batsched package + deps, push them on binary cache
nix-build ./ci -A test_stable | cachix push batsim
nix-build ./ci -A test_pinned | cachix push batsim
nix-build ./ci -A test_dev | cachix push batsim
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment