mirror of
https://codeberg.org/spire/nix.git
synced 2026-06-03 09:54:19 +02:00
package sourcemod-include-library
This commit is contained in:
parent
06c8e7370f
commit
8e8445cec9
5 changed files with 30 additions and 6 deletions
|
|
@ -9,4 +9,5 @@ final: prev: {
|
|||
sourcepawn = final.callPackage ./sourcepawn.nix {};
|
||||
sourcemod-includes = final.callPackage ./sourcemod-includes.nix {};
|
||||
buildSourcePawnScript = final.callPackage ./build-sourcepawn-script.nix {};
|
||||
sourcemod-include-library = final.callPackage ./sourcemod-include-library.nix {};
|
||||
}
|
||||
|
|
|
|||
20
pkgs/sourcemod-include-library.nix
Normal file
20
pkgs/sourcemod-include-library.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
}: stdenv.mkDerivation rec {
|
||||
pname = "sourcemod-include-library";
|
||||
version = "19-10-2022";
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "JoinedSenses";
|
||||
repo = "SourceMod-IncludeLibrary";
|
||||
rev = "9d4e4263b77aa0c4fcdadd498c1420c64b3c1c10";
|
||||
hash = "sha256-kO3iRHr3D0qLmgMh4SD3yz14bxSUD0r9pi6dHj8dnN0=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
cp -r $src $out
|
||||
'';
|
||||
}
|
||||
|
|
@ -46,11 +46,13 @@
|
|||
|
||||
passthru = {
|
||||
buildInclude = let
|
||||
fileNameForStorePath = path: substring 44 (stringLength path -44) path;
|
||||
in files: runCommand "sourcepawn-include" {} ''
|
||||
mkdir -p $out/include
|
||||
${concatStringsSep "\n" (map (file: "cp ${file} $out/include/${fileNameForStorePath file}") files)}
|
||||
'';
|
||||
fileNameForStorePath = path: substring 44 (stringLength path - 44) path;
|
||||
in
|
||||
files:
|
||||
runCommand "sourcepawn-include" {} ''
|
||||
mkdir -p $out/include
|
||||
${concatStringsSep "\n" (map (file: "cp ${file} $out/include/${fileNameForStorePath file}") files)}
|
||||
'';
|
||||
includes = {
|
||||
sourcemod = sourcemod-includes;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue