[Init]
This commit is contained in:
33
pkgs/custom/repalette.nix
Normal file
33
pkgs/custom/repalette.nix
Normal 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
31
pkgs/custom/simc.nix
Normal 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
7
pkgs/default.nix
Normal 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
17
pkgs/overlay.nix
Executable 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=";
|
||||
};
|
||||
});
|
||||
|
||||
})]
|
Reference in New Issue
Block a user