Skip to content

Commit 2367533

Browse files
committed
feat: add Nix and NixOS assets
1 parent 8131f3f commit 2367533

15 files changed

+3237
-0
lines changed

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
11
node_modules
22
db/*
33
*.log
4+
5+
# VM disk images
6+
*.qcow2
7+
8+
# Nix build results
9+
result
10+
result-*
11+
repl-result-*
12+
13+
# NixOS test driver REPL history
14+
.nixos-test-history

app.nix

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
lib,
3+
config,
4+
dream2nix,
5+
pkgs,
6+
...
7+
} @ args: let
8+
packageJSON = lib.importJSON ./package.json;
9+
in {
10+
imports = [
11+
dream2nix.modules.dream2nix.nodejs-package-json-v3
12+
dream2nix.modules.dream2nix.nodejs-granular-v3
13+
];
14+
15+
inherit (packageJSON) name version;
16+
17+
# Take advantage of a shell injection vector in dream2nix in order to apply a
18+
# workaround for an issue with `npm i` converting dependencies specified with
19+
# `git+https://` or `github:` to `git+ssh://`.
20+
# See:
21+
# - https://github.com/npm/cli/issues/2610
22+
# - https://github.com/npm/cli/issues/2631
23+
nodejs-package-json.npmArgs = lib.mkAfter [
24+
"--package-lock-only' ; ${lib.getExe pkgs.gnused} -i -e 's|git+ssh://|git+https://|g' ./package-lock.json #"
25+
];
26+
27+
mkDerivation = {
28+
src = lib.cleanSource ./.;
29+
doCheck = false;
30+
meta = {
31+
# XXX broken somehow? `lib.licenses.gpl3` works...
32+
#license = lib.licenses.cc-by-nc-40;
33+
homepage = "https://github.com/LowPowerLab/RaspberryPi-Gateway";
34+
};
35+
};
36+
}

0 commit comments

Comments
 (0)