-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
35 lines (32 loc) · 998 Bytes
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
systems.url = "github:nix-systems/default";
};
outputs = inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; }
{
systems = import inputs.systems;
perSystem = { self', pkgs, lib, system, ...} :
{
packages.default = pkgs.stdenv.mkDerivation
(finalAttrs: {
name = "tinylisp";
# TODO the prebuild is really slow and I'm not sure why :(
src = ./.;
installPhase = ''
make install DESTDIR=$out
'';
});
apps.default = {
program = "${self'.packages.default}/bin/tl";
};
devShells.default =
pkgs.mkShell {
packages = with pkgs; [ gcc gnumake ];
};
};
};
}