Clean up and update flake

This commit is contained in:
Tristan Daniël Maat 2022-07-30 17:42:07 +01:00
parent 99524e6a82
commit ca369cd30e
Signed by: tlater
GPG key ID: 49670FD774E43268
2 changed files with 32 additions and 18 deletions

View file

@ -3,6 +3,7 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.05";
nix-filter.url = "github:numtide/nix-filter";
npmlock2nix = {
url = "github:nix-community/npmlock2nix";
flake = false;
@ -12,7 +13,7 @@
outputs = {
self,
nixpkgs,
flake-utils,
nix-filter,
npmlock2nix,
}: let
# At the moment, we only deploy to x86_64-linux. Update when we
@ -27,7 +28,11 @@
in {
packages.${system} = rec {
tlaternet-templates = pkgs.npmlock2nix.build {
src = self;
src = pkgs.lib.cleanSource self;
buildInputs = with pkgs; [
util-linux
];
installPhase = ''
cp -r dist $out/
@ -35,8 +40,6 @@
node_modules_attrs = {
buildInputs = with pkgs; [
elmPackages.elm
pkg-config
python3
vips
@ -50,11 +53,21 @@
devShells.${system} = {
default = pkgs.npmlock2nix.shell {
src = self;
src = nix-filter.lib {
root = self;
include = [
"package.json"
"package-lock.json"
];
};
buildInputs = with pkgs.nodePackages; [
npm-check-updates
prettier
];
node_modules_attrs = {
buildInputs = with pkgs; [
elmPackages.elm
pkg-config
python3
vips