-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
37 lines (30 loc) · 880 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
36
37
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs, ... }: let
systems = [ "x86_64-linux" "aarch64" ];
forEachSystem = f: with nixpkgs.lib; foldAttrs mergeAttrs {}
(lists.forEach systems (system:
mapAttrs (name: value: { ${system} = value; }) (f system)
));
in forEachSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
in rec {
devShells.default = pkgs.mkShell {
inputsFrom = [
packages.default
];
};
packages.default = pkgs.stdenv.mkDerivation {
name = "kernel32";
pname = "kernel32";
shellHook = ''
export PS1="(kernel32-blog) \u@\h:\w\$ "
'';
src = ./.;
nativeBuildInputs = with pkgs; [ go hugo ];
buildPhase = "hugo --gc --minify --baseURL https://kernel32.xyz";
};
});
}