-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
40 lines (37 loc) · 1.15 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
{
description = "Interpreter of IGCSE Computer Science 0478 pseudocode";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system: rec {
packages = {
pcse = with nixpkgs.legacyPackages."${system}"; stdenv.mkDerivation {
pname = "pcse";
version = "v0.0.3";
src = ./.;
nativeBuildInputs = [
cmake
] ++ (with llvmPackages_13; [
clang
]);
buildInputs = [
catch2
];
buildPhase = ''
cmake -DCMAKE_BUILD_TYPE=Release .
make
'';
installPhase = ''
mkdir -p $out/bin
cp pcse $out/bin
'';
};
};
defaultPackage = packages.pcse;
defaultApp = {
type = "app";
program = "bin/pcse";
};
});
}