-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
47 lines (38 loc) · 1.27 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
{
description = "dynsys";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
ds.url = "github:hydrastro/ds";
lizard.url = "github:hydrastro/lizard";
};
outputs = { self, nixpkgs, ds, lizard }: {
packages = nixpkgs.lib.genAttrs [ "x86_64-linux" ] (system:
let
pkgs = import nixpkgs { inherit system; };
in rec {
dynsys = pkgs.stdenv.mkDerivation {
pname = "dynsys";
version = "0.0.0";
src = ./.;
# (pkgs.callPackage ds { })
buildInputs = [ pkgs.gmp pkgs.stdenv.cc ds.defaultPackage.x86_64-linux lizard.defaultPackage.x86_64-linux pkgs.virtualgl pkgs.freeglut pkgs.glew pkgs.glibc pkgs.cglm pkgs.glfw3 pkgs.freetype];
buildPhase = ''
make clean PREFIX=$out
make PREFIX=$out
'';
installPhase = ''
mkdir -p $out/bin
cp dynsys $out/bin/
chmod +x $out/bin/dynsys
'';
meta = with pkgs.lib; {
description = "dynsys";
#license = licenses.mit;
#maintainers = [ maintainers.yourname ];
platforms = platforms.unix;
};
};
});
defaultPackage = { x86_64-linux = self.packages.x86_64-linux.dynsys; };
};
}