Add meta section to nix package, fix nix update script writing to wrong variable in hashes.json
This commit is contained in:
parent
628b094865
commit
03e150fc26
BIN
flake.lock
generated
BIN
flake.lock
generated
Binary file not shown.
12
flake.nix
12
flake.nix
@ -13,11 +13,21 @@
|
||||
inherit system;
|
||||
};
|
||||
hashesFile = builtins.fromJSON (builtins.readFile ./hashes.json);
|
||||
lib = pkgs.lib;
|
||||
in rec {
|
||||
packages.default = pkgs.buildNpmPackage {
|
||||
pname = "spacebar-server-ts";
|
||||
src = ./.;
|
||||
name = "spacebar-server-ts";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Spacebar server, a FOSS reimplementation of the Discord backend.";
|
||||
homepage = "https://github.com/spacebarchat/server";
|
||||
license = licenses.agpl3Plus;
|
||||
platforms = platforms.all;
|
||||
mainProgram = "start-bundle";
|
||||
};
|
||||
|
||||
src = ./.;
|
||||
nativeBuildInputs = with pkgs; [ python3 ];
|
||||
npmDepsHash = hashesFile.npmDepsHash;
|
||||
makeCacheWritable = true;
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
{
|
||||
"npmDepsHash": "sha256-fZNDN2/fNy6Nu7tbr0RhQ8j4BP7X1Yhrh/fSTH7hbJc="
|
||||
"npmDepsHash": "sha256-RxGkjCU9qqqDMjhJ5aEq1w7c7lS4nAp0/3F0zASJQms="
|
||||
}
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
nix flake update
|
||||
DEPS_HASH=`prefetch-npm-deps package-lock.json`
|
||||
TMPFILE=$(mktemp)
|
||||
jq '.npm_deps_hash = "'$DEPS_HASH'"' hashes.json > $TMPFILE
|
||||
jq '.npmDepsHash = "'$DEPS_HASH'"' hashes.json > $TMPFILE
|
||||
mv -- "$TMPFILE" hashes.json
|
||||
|
||||
nom build .# || exit $?
|
||||
git add hashes.json flake.lock flake.nix
|
||||
git add hashes.json flake.lock flake.nix
|
||||
|
||||
Reference in New Issue
Block a user