This repository has been archived on 2022-09-16. You can view files and clone it, but cannot push or open issues or pull requests.
tlaternet-templates/flake.nix
Tristan Daniël Maat 594e9bcbfd
Hack in a package.yaml instead of package.json
json is just incredibly tedious to use for this, especially because of
lack of comments.

Upstream has been informed of this many times apparently, npm won't
change it. Just hack it downstream.

npm will never get better, will it...
2022-08-05 19:25:14 +01:00

50 lines
1.1 KiB
Nix

{
description = "tlater.net web server contents";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.05";
nix-filter.url = "github:numtide/nix-filter";
npmlock2nix = {
url = "github:nix-community/npmlock2nix";
flake = false;
};
};
outputs = {
self,
nixpkgs,
nix-filter,
npmlock2nix,
}: let
# At the moment, we only deploy to x86_64-linux. Update when we
# care about another platform.
system = "x86_64-linux";
overlays = [
(final: prev: {
npmlock2nix = import npmlock2nix {pkgs = prev;};
})
];
pkgs = import nixpkgs {inherit system overlays;};
package = import ./nix/package.nix {
inherit self pkgs;
nix-filter = nix-filter.lib;
};
in {
apps.${system} = import ./nix/utilities {inherit pkgs;};
packages.${system} = rec {
tlaternet-templates = package.package;
default = tlaternet-templates;
};
devShells.${system} = {
default = package.shell;
};
checks.${system} = import ./nix/checks.nix {
inherit self pkgs;
nix-filter = nix-filter.lib;
};
};
}