Skip to content

Commit ccdb1ab

Browse files
committed
Add Nix flake build files
1 parent 5474943 commit ccdb1ab

File tree

3 files changed

+83
-0
lines changed

3 files changed

+83
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@
1919
/old
2020
/ruby/flexlay_wrap.so
2121
/simple/simple
22+
/result
2223
moc_*.cpp

flake.lock

Lines changed: 43 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
description = "SuperTux 0.4.0 level editor";
3+
4+
inputs = {
5+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11";
6+
flake-utils.url = "github:numtide/flake-utils";
7+
};
8+
9+
outputs = { self, nixpkgs, flake-utils }:
10+
flake-utils.lib.eachDefaultSystem (system:
11+
let
12+
pkgs = nixpkgs.legacyPackages.${system};
13+
in rec {
14+
packages = flake-utils.lib.flattenTree rec {
15+
flexlay = pkgs.python3Packages.buildPythonPackage rec {
16+
name = "flexlay";
17+
src = self;
18+
nativeBuildInputs = [ pkgs.qt5.wrapQtAppsHook ];
19+
makeWrapperArgs = [
20+
"\${qtWrapperArgs[@]}"
21+
"--set" "LIBGL_DRIVERS_PATH" "${pkgs.mesa.drivers}/lib/dri"
22+
"--prefix" "LD_LIBRARY_PATH" ":" "${pkgs.mesa.drivers}/lib"
23+
];
24+
preCheck = ''
25+
export QT_QPA_PLATFORM_PLUGIN_PATH="${pkgs.qt5.qtbase.bin}/lib/qt-${pkgs.qt5.qtbase.version}/plugins";
26+
'';
27+
propagatedBuildInputs = [
28+
pkgs.xorg.libxcb
29+
pkgs.p7zip
30+
pkgs.python3Packages.setuptools
31+
pkgs.python3Packages.numpy
32+
pkgs.python3Packages.pyqt5
33+
pkgs.python3Packages.pyxdg
34+
];
35+
};
36+
};
37+
defaultPackage = packages.flexlay;
38+
});
39+
}

0 commit comments

Comments
 (0)