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
|
|
@ -10,6 +10,7 @@ The following is currently packaged:
|
||||||
- `sourcepawn`
|
- `sourcepawn`
|
||||||
- `metamod-source`
|
- `metamod-source`
|
||||||
- `sourcemod`
|
- `sourcemod`
|
||||||
|
- [`sourcemod-include-library`](https://github.com/JoinedSenses/SourceMod-IncludeLibrary)
|
||||||
|
|
||||||
|
|
||||||
## Sourcemod SDKs
|
## Sourcemod SDKs
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
platformSdks = filterAttrs (name: sdk: elem system sdk.meta.platforms) pkgs.hl2sdk;
|
platformSdks = filterAttrs (name: sdk: elem system sdk.meta.platforms) pkgs.hl2sdk;
|
||||||
in rec {
|
in rec {
|
||||||
packages = rec {
|
packages = rec {
|
||||||
inherit (pkgs) ambuild sourcemod sourcepawn sourcemod-includes buildSourcePawnScript hl2sdk;
|
inherit (pkgs) ambuild sourcemod sourcepawn sourcemod-includes buildSourcePawnScript hl2sdk sourcemod-include-library;
|
||||||
sourcemods = mapAttrs (name: sdk: pkgs.sourcemod.override {sdks = {${name} = sdk;};}) hl2sdk;
|
sourcemods = mapAttrs (name: sdk: pkgs.sourcemod.override {sdks = {${name} = sdk;};}) hl2sdk;
|
||||||
buildTestScript = buildSourcePawnScript {
|
buildTestScript = buildSourcePawnScript {
|
||||||
name = "test";
|
name = "test";
|
||||||
|
|
|
||||||
|
|
@ -9,4 +9,5 @@ final: prev: {
|
||||||
sourcepawn = final.callPackage ./sourcepawn.nix {};
|
sourcepawn = final.callPackage ./sourcepawn.nix {};
|
||||||
sourcemod-includes = final.callPackage ./sourcemod-includes.nix {};
|
sourcemod-includes = final.callPackage ./sourcemod-includes.nix {};
|
||||||
buildSourcePawnScript = final.callPackage ./build-sourcepawn-script.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 = {
|
passthru = {
|
||||||
buildInclude = let
|
buildInclude = let
|
||||||
fileNameForStorePath = path: substring 44 (stringLength path -44) path;
|
fileNameForStorePath = path: substring 44 (stringLength path - 44) path;
|
||||||
in files: runCommand "sourcepawn-include" {} ''
|
in
|
||||||
mkdir -p $out/include
|
files:
|
||||||
${concatStringsSep "\n" (map (file: "cp ${file} $out/include/${fileNameForStorePath file}") files)}
|
runCommand "sourcepawn-include" {} ''
|
||||||
'';
|
mkdir -p $out/include
|
||||||
|
${concatStringsSep "\n" (map (file: "cp ${file} $out/include/${fileNameForStorePath file}") files)}
|
||||||
|
'';
|
||||||
includes = {
|
includes = {
|
||||||
sourcemod = sourcemod-includes;
|
sourcemod = sourcemod-includes;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue