mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 09:23:01 +00:00
gephgui-wry: use pnpm.fetchDeps
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
parent
18b124840f
commit
6fe1507ab2
@ -4,7 +4,8 @@
|
|||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, buildGoModule
|
, buildGoModule
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
, nodePackages
|
, nodejs
|
||||||
|
, pnpm
|
||||||
, cacert
|
, cacert
|
||||||
, esbuild
|
, esbuild
|
||||||
, jq
|
, jq
|
||||||
@ -48,7 +49,7 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
gui = stdenvNoCC.mkDerivation rec {
|
gui = stdenvNoCC.mkDerivation (finalAttrs: {
|
||||||
pname = "geph-gui";
|
pname = "geph-gui";
|
||||||
inherit version;
|
inherit version;
|
||||||
|
|
||||||
@ -60,42 +61,11 @@ in
|
|||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
pnpm-deps = stdenvNoCC.mkDerivation {
|
|
||||||
pname = "${pname}-pnpm-deps";
|
|
||||||
inherit src version;
|
|
||||||
|
|
||||||
sourceRoot = "${src.name}/gephgui-wry/gephgui";
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
jq
|
|
||||||
moreutils
|
|
||||||
nodePackages.pnpm
|
|
||||||
cacert
|
|
||||||
];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
export HOME=$(mktemp -d)
|
|
||||||
pnpm config set store-dir $out
|
|
||||||
pnpm install --ignore-scripts
|
|
||||||
|
|
||||||
# Remove timestamp and sort the json files
|
|
||||||
rm -rf $out/v3/tmp
|
|
||||||
for f in $(find $out -name "*.json"); do
|
|
||||||
sed -i -E -e 's/"checkedAt":[0-9]+,//g' $f
|
|
||||||
jq --sort-keys . $f | sponge $f
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
|
|
||||||
dontFixup = true;
|
|
||||||
outputHashMode = "recursive";
|
|
||||||
outputHash = "sha256-OKPx5xRI7DWd6m31nYx1biP0k6pcZ7fq7dfVlHda4O0=";
|
|
||||||
};
|
|
||||||
|
|
||||||
gephgui-wry = rustPlatform.buildRustPackage {
|
gephgui-wry = rustPlatform.buildRustPackage {
|
||||||
pname = "gephgui-wry";
|
pname = "gephgui-wry";
|
||||||
inherit version src;
|
inherit (finalAttrs) version src;
|
||||||
|
|
||||||
sourceRoot = "${src.name}/gephgui-wry";
|
sourceRoot = "${finalAttrs.src.name}/gephgui-wry";
|
||||||
|
|
||||||
cargoLock = {
|
cargoLock = {
|
||||||
lockFile = ./Cargo.lock;
|
lockFile = ./Cargo.lock;
|
||||||
@ -105,10 +75,17 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pnpmDeps = pnpm.fetchDeps {
|
||||||
|
inherit (finalAttrs) pname version src;
|
||||||
|
sourceRoot = "${finalAttrs.src.name}/gephgui-wry/gephgui";
|
||||||
|
hash = "sha256-0MGlsLEgugQ1wEz07ROIwkanTa8PSKwIaxNahyS1014=";
|
||||||
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
pkg-config
|
pkg-config
|
||||||
nodePackages.pnpm
|
pnpm.configHook
|
||||||
makeWrapper
|
makeWrapper
|
||||||
|
nodejs
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
@ -132,22 +109,19 @@ in
|
|||||||
});
|
});
|
||||||
})}";
|
})}";
|
||||||
|
|
||||||
|
pnpmRoot = "gephgui";
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
cd gephgui
|
pushd gephgui
|
||||||
export HOME=$(mktemp -d)
|
|
||||||
pnpm config set store-dir ${pnpm-deps}
|
|
||||||
pnpm install --ignore-scripts --offline
|
|
||||||
chmod -R +w node_modules
|
|
||||||
pnpm rebuild
|
|
||||||
pnpm build
|
pnpm build
|
||||||
cd ..
|
popd
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
dontBuild = true;
|
dontBuild = true;
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install -Dt $out/bin ${gephgui-wry}/bin/gephgui-wry
|
install -Dt $out/bin ${finalAttrs.gephgui-wry}/bin/gephgui-wry
|
||||||
install -d $out/share/icons/hicolor
|
install -d $out/share/icons/hicolor
|
||||||
for i in '16' '32' '64' '128' '256'
|
for i in '16' '32' '64' '128' '256'
|
||||||
do
|
do
|
||||||
@ -163,5 +137,5 @@ in
|
|||||||
meta = geph-meta // {
|
meta = geph-meta // {
|
||||||
license = with lib.licenses; [ unfree ];
|
license = with lib.licenses; [ unfree ];
|
||||||
};
|
};
|
||||||
};
|
});
|
||||||
}
|
}
|
||||||
|
@ -20827,7 +20827,7 @@ with pkgs;
|
|||||||
gecode_6 = qt5.callPackage ../development/libraries/gecode { };
|
gecode_6 = qt5.callPackage ../development/libraries/gecode { };
|
||||||
gecode = gecode_6;
|
gecode = gecode_6;
|
||||||
|
|
||||||
geph = recurseIntoAttrs (callPackages ../applications/networking/geph { });
|
geph = recurseIntoAttrs (callPackages ../applications/networking/geph { pnpm = pnpm_8; });
|
||||||
|
|
||||||
gephi = callPackage ../applications/science/misc/gephi { };
|
gephi = callPackage ../applications/science/misc/gephi { };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user