cassandra.updateScript: Generate JSON
This commit is contained in:
parent
0038244d60
commit
efd55dbef4
1 changed files with 5 additions and 8 deletions
|
@ -6,7 +6,7 @@
|
|||
}:
|
||||
let
|
||||
inherit (lib) makeBinPath;
|
||||
filename = lib.strings.replaceStrings [ "_" ] [ "." ] generation + ".nix";
|
||||
filename = lib.strings.replaceStrings [ "_" ] [ "." ] generation + ".json";
|
||||
regex = lib.strings.replaceStrings [ "_" ] [ "[.]" ] generation;
|
||||
in
|
||||
writeScript "update-cassandra_${generation}" ''
|
||||
|
@ -34,12 +34,9 @@ writeScript "update-cassandra_${generation}" ''
|
|||
version="$(grep -E '^${regex}' <$tmp/versions | head -n 1)"
|
||||
hash="$(nix-prefetch-url "mirror://apache/cassandra/$version/apache-cassandra-$version-bin.tar.gz")"
|
||||
cat >${filename} <<EOF
|
||||
# GENERATED BY update.sh
|
||||
{ callPackage, ... } @ args:
|
||||
callPackage ./generic.nix (args // {
|
||||
version = "$version";
|
||||
sha256 = "$hash";
|
||||
generation = "${generation}";
|
||||
})
|
||||
{
|
||||
"version": "$version",
|
||||
"sha256": "$hash"
|
||||
}
|
||||
EOF
|
||||
''
|
||||
|
|
Loading…
Reference in a new issue