Add flake.nix
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1 +1,3 @@
|
|||||||
node_modules
|
node_modules
|
||||||
|
|
||||||
|
result*
|
||||||
|
2
app.js
Normal file → Executable file
2
app.js
Normal file → Executable file
@@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
import express from 'express';
|
import express from 'express';
|
||||||
import {createClient} from 'db-vendo-client/index.js';
|
import {createClient} from 'db-vendo-client/index.js';
|
||||||
import {profile as dbnavProfile} from 'db-vendo-client/p/dbnav/index.js';
|
import {profile as dbnavProfile} from 'db-vendo-client/p/dbnav/index.js';
|
||||||
|
27
flake.lock
generated
Normal file
27
flake.lock
generated
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1751637120,
|
||||||
|
"narHash": "sha256-xVNy/XopSfIG9c46nRmPaKfH1Gn/56vQ8++xWA8itO4=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "5c724ed1388e53cc231ed98330a60eb2f7be4be3",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
34
flake.nix
Normal file
34
flake.nix
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
};
|
||||||
|
outputs = { self, nixpkgs, ... }: let
|
||||||
|
forAllSystems = f: (nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ] (system: let
|
||||||
|
pkgs = import nixpkgs { inherit system; };
|
||||||
|
in f { inherit pkgs system; } ));
|
||||||
|
in {
|
||||||
|
packages = forAllSystems ({pkgs, system, ...}: {
|
||||||
|
traveldrafter = pkgs.buildNpmPackage rec {
|
||||||
|
pname = "traveldrafter";
|
||||||
|
version = "0.0.1";
|
||||||
|
|
||||||
|
src = ./.;
|
||||||
|
|
||||||
|
npmDeps = pkgs.importNpmLock {
|
||||||
|
npmRoot = src;
|
||||||
|
};
|
||||||
|
|
||||||
|
npmConfigHook = pkgs.importNpmLock.npmConfigHook;
|
||||||
|
|
||||||
|
dontNpmBuild = true;
|
||||||
|
};
|
||||||
|
default = self.packages.${system}.traveldrafter;
|
||||||
|
});
|
||||||
|
|
||||||
|
hydraJobs = {
|
||||||
|
inherit (self)
|
||||||
|
packages;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@@ -3,9 +3,11 @@
|
|||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node app.js",
|
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
|
"bin": {
|
||||||
|
"traveldrafter": "app.js"
|
||||||
|
},
|
||||||
"author": "clerie",
|
"author": "clerie",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"description": "",
|
"description": "",
|
||||||
|
Reference in New Issue
Block a user