65 lines
1.2 KiB
Nix
65 lines
1.2 KiB
Nix
|
{
|
||
|
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
|
||
|
'';
|
||
|
}
|