emilylange 2023-09-14 23:01:35 +02:00
parent 2cd86bf59a
commit bdf8c4b61d
No known key found for this signature in database
GPG Key ID: 0AD773CE46FD0F87
2 changed files with 779 additions and 422 deletions

File diff suppressed because it is too large Load Diff

View File

@ -40,24 +40,17 @@ let
commonDerivationAttrs = rec { commonDerivationAttrs = rec {
pname = "lldap"; pname = "lldap";
version = "0.4.3"; version = "0.5.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "lldap"; owner = "lldap";
repo = "lldap"; repo = "lldap";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-FAUTykFh2eGVpx6LrCjV9xWbBPH8pCgAJv3vOXFMFZ4="; hash = "sha256-2MEfwppkS9l3iHPNlkJB4tJnma0xMi0AckLv6wpzy1Y=";
}; };
postPatch = ''
ln -s --force ${./Cargo.lock} Cargo.lock
'';
# `Cargo.lock` has git dependencies, meaning can't use `cargoHash` # `Cargo.lock` has git dependencies, meaning can't use `cargoHash`
cargoLock = { cargoLock = {
# 0.4.3 has been tagged before the actual Cargo.lock bump, resulting in an inconsitent lock file.
# To work around this, the Cargo.lock below is from the commit right after the tag:
# https://github.com/lldap/lldap/commit/7b4188a376baabda48d88fdca3a10756da48adda
lockFile = ./Cargo.lock; lockFile = ./Cargo.lock;
outputHashes = { outputHashes = {
"lber-0.4.1" = "sha256-2rGTpg8puIAXggX9rEbXPdirfetNOHWfFc80xqzPMT4="; "lber-0.4.1" = "sha256-2rGTpg8puIAXggX9rEbXPdirfetNOHWfFc80xqzPMT4=";
@ -88,20 +81,16 @@ let
in rustPlatform.buildRustPackage (commonDerivationAttrs // { in rustPlatform.buildRustPackage (commonDerivationAttrs // {
cargoBuildFlags = [ "-p" "lldap" "-p" "migration-tool" "-p" "lldap_set_password" ]; cargoBuildFlags = [ "-p" "lldap" "-p" "lldap_migration_tool" "-p" "lldap_set_password" ];
patches = [ patches = [
./static-frontend-path.patch ./static-frontend-path.patch
]; ];
postPatch = commonDerivationAttrs.postPatch + '' postPatch = ''
substituteInPlace server/src/infra/tcp_server.rs --subst-var-by frontend '${frontend}' substituteInPlace server/src/infra/tcp_server.rs --subst-var-by frontend '${frontend}'
''; '';
postInstall = ''
mv $out/bin/migration-tool $out/bin/lldap_migration_tool
'';
passthru = { passthru = {
inherit frontend; inherit frontend;
tests = { tests = {