1
0
Fork 0
mirror of https://codeberg.org/demostf/api.git synced 2026-08-02 12:24:52 +02:00

add flake

This commit is contained in:
Robin Appelman 2022-11-10 18:59:23 +01:00
commit af832d533e
4 changed files with 77 additions and 0 deletions

32
flake.nix Normal file
View file

@ -0,0 +1,32 @@
{
inputs = {
nixpkgs.url = "nixpkgs/release-22.05";
utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
utils,
}:
utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
};
npmLd = pkgs.writeShellScriptBin "npm" ''
PATH="$PATH ${pkgs.nodejs-16_x}/bin" LD=$CC ${pkgs.nodejs-16_x}/bin/npm $@
'';
nodeLd = pkgs.writeShellScriptBin "node" ''
LD=$CC ${pkgs.nodejs-16_x}/bin/node $@
'';
in rec {
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
gnumake
php
npmLd
nodeLd
];
};
});
}