This commit is contained in:
2023-04-12 20:32:07 +02:00
committed by soraefir
parent 10fbbc2654
commit 35f2319515
90 changed files with 5440 additions and 4 deletions

33
pkgs/custom/repalette.nix Normal file
View File

@@ -0,0 +1,33 @@
{ lib, stdenv, fetchFromGitHub, makeWrapper, stb
}:
stdenv.mkDerivation rec {
pname = "repalette";
version = "849e1857cc985968c5dd08377fff27b258931937";
src = fetchFromGitHub {
owner = "ziap";
repo = pname;
rev = version;
sha256 = "sha256-Q86W9/xwFjViIyvnCQfwyQjzrfC122+KK6A3mwJPXOg=";
};
nativeBuildInputs = [
makeWrapper
];
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
configurePhase = ''
cp ${stb.src}/stb_image.h stb_image.h
cp ${stb.src}/stb_image_write.h stb_image_write.h
'';
buildPhase = ''
make ${pname}
'';
installPhase = ''
mkdir -p $out/bin
mv repalette $out/bin
'';
}

31
pkgs/custom/simc.nix Normal file
View File

@@ -0,0 +1,31 @@
{ lib, stdenv, fetchFromGitHub, wrapQtAppsHook, qmake, qtbase, qtwebengine, qtwayland
}:
stdenv.mkDerivation rec {
pname = "simc";
version = "d89e3825a840e0b80f7bccb99d2a86c8030ede57";
src = fetchFromGitHub rec {
owner = "simulationcraft";
repo = pname;
rev = version;
hash = "sha256-tj/hAUFD8z8ZYVvBEfoUoe+ynUwUoib1QIhxODpCwSo=";
};
nativeBuildInputs = [ wrapQtAppsHook qmake qtwebengine qtbase ];
buildInputs = [ qtwayland ];
configurePhase = ''
qmake simulationcraft.pro
'';
buildPhase = ''
SC_NO_NETWORKING=1 make -j$NIX_BUILD_CORES
'';
installPhase = ''
mkdir -p $out/bin
mv gui/SimulationCraft $out/bin
'';
}

7
pkgs/default.nix Normal file
View File

@@ -0,0 +1,7 @@
{
pkgs ? import <nixpkgs> {},
...
}:{
simc = (pkgs.qt6.callPackage ./custom/simc.nix { });
repalette = (pkgs.callPackage ./custom/repalette.nix { stdenv = pkgs.llvmPackages.stdenv; });
}

17
pkgs/overlay.nix Executable file
View File

@@ -0,0 +1,17 @@
{
pkgs,
...
}:
[(self: super: {
openttd-jgrpp = super.openttd-jgrpp.overrideAttrs (old: rec{
version = "0.53.3";
src = super.fetchFromGitHub rec {
owner = "JGRennison";
repo = "OpenTTD-patches";
rev = "jgrpp-0.53.3";
hash = "sha256-xpo4E07ifWUZy5z78Fwm1SpLP3wUBaBreZYbJuiNH3w=";
};
});
})]