-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
48 lines (39 loc) · 1.06 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
{
description = "a small command-line tool for fuzzy finding";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
outputs = { self, nixpkgs }:
let
allSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f {
pkgs = import nixpkgs { inherit system; };
name = "iris_${system}";
});
in
{
packages = forAllSystems ({ pkgs, name }: {
default = pkgs.stdenv.mkDerivation {
name = name;
src = ./.;
nativeBuildInputs = with pkgs; [
gnumake
pkg-config
];
buildInputs = with pkgs; [
clang-tools
pkgs.llvmPackages_latest.libstdcxxClang
pkgs.llvmPackages_latest.libcxx
ncurses
];
buildPhase = ''
TARGET=${name} make
'';
installPhase = ''
mkdir -p $out/bin
cp ${name} $out/bin
'';
};
});
};
}