nix fuckery
This commit is contained in:
parent
1b49477c4e
commit
017aadcf35
7 changed files with 159 additions and 79 deletions
64
nix/packages/gooey/default.nix
Normal file
64
nix/packages/gooey/default.nix
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
self,
|
||||
sdl3, # from self.packages
|
||||
lib,
|
||||
fetchurl,
|
||||
cmake,
|
||||
ninja,
|
||||
llvmPackages_19,
|
||||
...
|
||||
}: let
|
||||
pname = "gooey";
|
||||
version = "0.0.1";
|
||||
in
|
||||
llvmPackages_19.libcxxStdenv.mkDerivation {
|
||||
inherit pname version;
|
||||
src = builtins.path {
|
||||
# reproducible source path
|
||||
path = self;
|
||||
name = "${pname}-${version}";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
ninja
|
||||
(cmake.overrideAttrs {
|
||||
version = "3.30.4";
|
||||
src = let
|
||||
cmake-version = "3.30.4";
|
||||
in
|
||||
fetchurl {
|
||||
url = "https://cmake.org/files/v${lib.versions.majorMinor cmake-version}/cmake-${cmake-version}.tar.gz";
|
||||
hash = "sha256-x1nJcnTx56qq/LHw0mH53pvzpdbst+LfYWMkpG/nBLI=";
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
sdl3
|
||||
llvmPackages_19.clang-tools
|
||||
];
|
||||
|
||||
configurePhase = ''
|
||||
runHook preConfigure
|
||||
cmake -GNinja .
|
||||
runHook postConfiguree
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
ninja
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
mv gooey $out/bin
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
}
|
||||
Reference in a new issue