cup-docker{,-noserver}: 3.4.3 -> 3.5.1, enable finalAttr overrides (#465543)
This commit is contained in:
@@ -8,23 +8,25 @@
|
||||
nix-update-script,
|
||||
withServer ? true,
|
||||
}:
|
||||
let
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "cup-docker";
|
||||
version = "3.4.3";
|
||||
version = "3.5.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sergi0g";
|
||||
repo = "cup";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-RRhUSL9TR7qr93F5+fyhGW7j6VTs+yVvpni/JHmC5os=";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-l7TQwCzQNwrsM+xRcRcQaxIsnd8SVzrqEMwIoZGVBR0=";
|
||||
};
|
||||
web = stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "${pname}-web";
|
||||
inherit version src;
|
||||
|
||||
web = stdenvNoCC.mkDerivation (finalAttrsWeb: {
|
||||
pname = "${finalAttrs.pname}-web";
|
||||
inherit (finalAttrs) version src;
|
||||
impureEnvVars = lib.fetchers.proxyImpureEnvVars ++ [
|
||||
"GIT_PROXY_COMMAND"
|
||||
"SOCKS_SERVER"
|
||||
];
|
||||
sourceRoot = "${finalAttrs.src.name}/web";
|
||||
sourceRoot = "${finalAttrsWeb.src.name}/web";
|
||||
nativeBuildInputs = [
|
||||
bun
|
||||
nodejs-slim_latest
|
||||
@@ -47,17 +49,10 @@ let
|
||||
cp -R ./dist $out
|
||||
runHook postInstall
|
||||
'';
|
||||
outputHash = "sha256-Ac1PJYmTQv9XrmhmF1p77vdXh8252hz0CUKxJA+VQR4=";
|
||||
outputHash = "sha256-uLsWppRabaI7JSHYf3YsEvf0Y36kU/iuNXnDXd+6AXY=";
|
||||
outputHashAlgo = "sha256";
|
||||
outputHashMode = "recursive";
|
||||
});
|
||||
in
|
||||
rustPlatform.buildRustPackage {
|
||||
inherit
|
||||
src
|
||||
version
|
||||
pname
|
||||
;
|
||||
|
||||
cargoHash = "sha256-1VSbv6lDRRLZIu7hYrAqzQmvxcuhnPU0rcWfg7Upcm4=";
|
||||
|
||||
@@ -70,11 +65,10 @@ rustPlatform.buildRustPackage {
|
||||
];
|
||||
|
||||
preConfigure = lib.optionalString withServer ''
|
||||
cp -r ${web}/dist src/static
|
||||
cp -r ${finalAttrs.web}/dist src/static
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
inherit web;
|
||||
updateScript = nix-update-script {
|
||||
extraArgs = [
|
||||
"--subpackage"
|
||||
@@ -94,4 +88,4 @@ rustPlatform.buildRustPackage {
|
||||
kuflierl
|
||||
];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user