-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
33 lines (31 loc) · 1.02 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
{
description = "A really tiny engine for small games";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
flake-compat.url = "github:edolstra/flake-compat";
flake-compat.flake = false;
};
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
extension = if nixpkgs.lib.hasSuffix "Darwin" system then "mach" else "elf";
in
{
packages = rec {
default = pkgs.clangStdenv.mkDerivation rec {
name = "potetre2d";
src = ./.;
buildInputs = [ pkgs.python3 pkgs.libGLU pkgs.xorg.libX11 pkgs.alsa-lib ];
EXTERNAL_PATH = "./libs";
AUDIO_BACKEND = "fenster";
installPhase = ''
mkdir -p $out/bin $out/include $out/shared
cp build/potetre2d.${extension} $out/bin/potetre2d
'';
};
};
}
);
}