Remove Nimble from Nim wrapper
This commit is contained in:
parent
f73c211414
commit
7901ce6aef
@ -175,45 +175,8 @@ in {
|
||||
];
|
||||
});
|
||||
|
||||
nimble-unwrapped = stdenv.mkDerivation rec {
|
||||
pname = "nimble-unwrapped";
|
||||
version = "0.14.2";
|
||||
strictDeps = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nim-lang";
|
||||
repo = "nimble";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-8b5yKvEl7c7wA/8cpdaN2CSvawQJzuRce6mULj3z/mI=";
|
||||
};
|
||||
|
||||
depsBuildBuild = [ nim-unwrapped ];
|
||||
buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin Security;
|
||||
|
||||
nimFlags = [ "--cpu:${nimHost.cpu}" "--os:${nimHost.os}" "-d:release" ];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
HOME=$NIX_BUILD_TOP nim c $nimFlags src/nimble
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preBuild
|
||||
install -Dt $out/bin src/nimble
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Package manager for the Nim programming language";
|
||||
homepage = "https://github.com/nim-lang/nimble";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ ehmry ];
|
||||
mainProgram = "nimble";
|
||||
};
|
||||
};
|
||||
} // (let
|
||||
wrapNim = { nim', nimble', patches }:
|
||||
wrapNim = { nim', patches }:
|
||||
let
|
||||
targetPlatformConfig = stdenv.targetPlatform.config;
|
||||
self = stdenv.mkDerivation (finalAttrs: {
|
||||
@ -328,20 +291,11 @@ in {
|
||||
$wrapperArgs
|
||||
ln -s $out/bin/${targetPlatformConfig}-testament $out/bin/testament
|
||||
|
||||
'' + lib.strings.optionalString (nimble' != null) ''
|
||||
makeWrapper \
|
||||
${nimble'}/bin/nimble $out/bin/${targetPlatformConfig}-nimble \
|
||||
--suffix PATH : $out/bin
|
||||
ln -s $out/bin/${targetPlatformConfig}-nimble $out/bin/nimble
|
||||
|
||||
'' + ''
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
nim = nim';
|
||||
nimble = nimble';
|
||||
};
|
||||
passthru = { nim = nim'; };
|
||||
|
||||
meta = nim'.meta // {
|
||||
description = nim'.meta.description
|
||||
@ -356,13 +310,12 @@ in {
|
||||
|
||||
nim = wrapNim {
|
||||
nim' = buildPackages.nim-unwrapped;
|
||||
nimble' = buildPackages.nimble-unwrapped;
|
||||
patches = [ ./nim.cfg.patch ];
|
||||
};
|
||||
|
||||
nim2 = wrapNim {
|
||||
nim' = buildPackages.nim-unwrapped-2;
|
||||
nimble' = null;
|
||||
patches = [ ./nim2.cfg.patch ];
|
||||
};
|
||||
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user