mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-08 11:52:55 +01:00
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
12
flake.lock
12
flake.lock
@ -5,11 +5,11 @@
|
|||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1705309234,
|
"lastModified": 1710146030,
|
||||||
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -20,11 +20,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1708118438,
|
"lastModified": 1719254875,
|
||||||
"narHash": "sha256-kk9/0nuVgA220FcqH/D2xaN6uGyHp/zoxPNUmPCMmEE=",
|
"narHash": "sha256-ECni+IkwXjusHsm9Sexdtq8weAq/yUyt1TWIemXt3Ko=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5863c27340ba4de8f83e7e3c023b9599c3cb3c80",
|
"rev": "2893f56de08021cffd9b6b6dfc70fd9ccd51eb60",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
12
flake.nix
12
flake.nix
@ -13,11 +13,21 @@
|
|||||||
inherit system;
|
inherit system;
|
||||||
};
|
};
|
||||||
hashesFile = builtins.fromJSON (builtins.readFile ./hashes.json);
|
hashesFile = builtins.fromJSON (builtins.readFile ./hashes.json);
|
||||||
|
lib = pkgs.lib;
|
||||||
in rec {
|
in rec {
|
||||||
packages.default = pkgs.buildNpmPackage {
|
packages.default = pkgs.buildNpmPackage {
|
||||||
pname = "spacebar-server-ts";
|
pname = "spacebar-server-ts";
|
||||||
src = ./.;
|
|
||||||
name = "spacebar-server-ts";
|
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 ];
|
nativeBuildInputs = with pkgs; [ python3 ];
|
||||||
npmDepsHash = hashesFile.npmDepsHash;
|
npmDepsHash = hashesFile.npmDepsHash;
|
||||||
makeCacheWritable = true;
|
makeCacheWritable = true;
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"npmDepsHash": "sha256-fZNDN2/fNy6Nu7tbr0RhQ8j4BP7X1Yhrh/fSTH7hbJc="
|
"npmDepsHash": "sha256-RxGkjCU9qqqDMjhJ5aEq1w7c7lS4nAp0/3F0zASJQms="
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
nix flake update
|
nix flake update
|
||||||
DEPS_HASH=`prefetch-npm-deps package-lock.json`
|
DEPS_HASH=`prefetch-npm-deps package-lock.json`
|
||||||
TMPFILE=$(mktemp)
|
TMPFILE=$(mktemp)
|
||||||
jq '.npm_deps_hash = "'$DEPS_HASH'"' hashes.json > $TMPFILE
|
jq '.npmDepsHash = "'$DEPS_HASH'"' hashes.json > $TMPFILE
|
||||||
mv -- "$TMPFILE" hashes.json
|
mv -- "$TMPFILE" hashes.json
|
||||||
|
|
||||||
nom build .# || exit $?
|
nom build .# || exit $?
|
||||||
git add hashes.json flake.lock flake.nix
|
git add hashes.json flake.lock flake.nix
|
||||||
|
Loading…
Reference in New Issue
Block a user