Skip to content

Commit 169a5c3

Browse files
Mic92mergify[bot]
authored andcommitted
remove nix-ld-rs references
1 parent 93fa2cf commit 169a5c3

File tree

6 files changed

+24
-25
lines changed

6 files changed

+24
-25
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[package]
2-
name = "nix-ld-rs"
3-
version = "0.1.0"
2+
name = "nix-ld"
3+
version = "2.0.0"
44
edition = "2021"
55

66
[[bin]]
7-
name = "nix-ld-rs"
7+
name = "nix-ld"
88
test = false
99

1010
[[test]]

flake.nix

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,22 @@
1818
lib = pkgs.lib;
1919
in {
2020
packages = rec {
21-
nix-ld-rs = pkgs.callPackage ./package.nix {};
22-
default = nix-ld-rs;
21+
nix-ld = pkgs.callPackage ./package.nix {};
22+
default = nix-ld;
2323
};
2424

2525
checks = let
2626
nixosTests = import ./nixos-tests {
2727
inherit pkgs;
28-
nix-ld-rs = self.packages.${system}.nix-ld-rs;
28+
nix-ld = self.packages.${system}.nix-ld;
2929
};
3030
packages = lib.mapAttrs' (n: lib.nameValuePair "package-${n}") self.packages.${system};
3131
devShells = lib.mapAttrs' (n: lib.nameValuePair "devShell-${n}") self.devShells.${system};
3232
in packages //
3333
devShells //
3434
# test driver is broken on i686-linux
3535
lib.optionalAttrs (system != "i686-linux") nixosTests // {
36-
clippy = self.packages.${system}.nix-ld-rs.override {
36+
clippy = self.packages.${system}.nix-ld.override {
3737
enableClippy = true;
3838
};
3939
};
@@ -58,7 +58,7 @@
5858
});
5959
}) // {
6060
overlays.default = final: prev: {
61-
nix-ld-rs = final.callPackage ./package.nix { };
61+
nix-ld = final.callPackage ./package.nix { };
6262
};
6363
};
6464
}

nixos-tests/default.nix

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
{
22
pkgs ? import ../nixpkgs.nix,
3-
nix-ld-rs ? null,
3+
nix-ld ? null,
44
}: let
55
inherit (pkgs) lib;
66

77
nixosLib = import (pkgs.path + "/nixos/lib") {
88
inherit pkgs lib;
99
};
10-
nix-ld-rs' = if nix-ld-rs != null then nix-ld-rs else pkgs.nix-ld-rs;
10+
nix-ld' = if nix-ld != null then nix-ld else pkgs.nix-ld;
1111
in {
1212
basic = nixosLib.runTest {
1313
name = "basic";
1414
hostPkgs = pkgs;
1515
nodes.machine = { pkgs, ... }: {
1616
programs.nix-ld = {
1717
enable = true;
18-
package = nix-ld-rs';
18+
package = nix-ld';
1919
};
2020
environment.systemPackages = [
2121
(pkgs.runCommand "patched-hello" {} ''
2222
install -D -m755 ${pkgs.hello}/bin/hello $out/bin/hello
23-
patchelf $out/bin/hello --set-interpreter $(cat ${nix-ld-rs'}/nix-support/ldpath)
23+
patchelf $out/bin/hello --set-interpreter $(cat ${nix-ld'}/nix-support/ldpath)
2424
'')
2525
];
2626
};
2727
testScript = ''
2828
start_all()
2929
machine.succeed("hello")
3030
machine.succeed("ls -la /run/current-system/sw/share/nix-ld/lib/ld.so >&2")
31-
machine.succeed("$(< ${nix-ld-rs'}/nix-support/ldpath) --version")
31+
machine.succeed("$(< ${nix-ld'}/nix-support/ldpath) --version")
3232
3333
# test fallback if NIX_LD is not set
34-
machine.succeed("unset NIX_LD; unset NIX_LD_LIBRARY_PATH; $(< ${nix-ld-rs'}/nix-support/ldpath) $(which hello)")
34+
machine.succeed("unset NIX_LD; unset NIX_LD_LIBRARY_PATH; $(< ${nix-ld'}/nix-support/ldpath) $(which hello)")
3535
'';
3636
};
3737
}

package.nix

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ let
1919
else
2020
"/lib";
2121

22-
nix-ld-rs = rustPlatform.buildRustPackage {
23-
name = "nix-ld-rs";
22+
nix-ld = rustPlatform.buildRustPackage {
23+
name = "nix-ld";
2424

2525
cargoLock.lockFile = ./Cargo.lock;
2626

@@ -37,24 +37,23 @@ let
3737

3838
postInstall = ''
3939
mkdir -p $out/libexec
40-
ln -s $out/bin/nix-ld-rs $out/libexec/nix-ld-rs
41-
ln -s $out/bin/nix-ld-rs $out/libexec/nix-ld
40+
ln -s $out/bin/nix-ld $out/libexec/nix-ld
4241
4342
mkdir -p $out/nix-support
4443
4544
ldpath=${libDir}/$(basename ${stdenv.cc.bintools.dynamicLinker})
4645
echo "$ldpath" > $out/nix-support/ldpath
4746
mkdir -p $out/lib/tmpfiles.d/
4847
cat > $out/lib/tmpfiles.d/nix-ld.conf <<EOF
49-
L+ $ldpath - - - - $out/libexec/nix-ld-rs
48+
L+ $ldpath - - - - $out/libexec/nix-ld
5049
EOF
5150
'';
5251

53-
passthru.tests = import ./nixos-tests { inherit pkgs nix-ld-rs; };
52+
passthru.tests = import ./nixos-tests { inherit pkgs nix-ld; };
5453
};
5554
in
5655
if enableClippy then
57-
nix-ld-rs.overrideAttrs (oldAttrs: {
56+
nix-ld.overrideAttrs (oldAttrs: {
5857
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [ pkgs.clippy ];
5958
phases = [
6059
"unpackPhase"
@@ -67,4 +66,4 @@ if enableClippy then
6766
'';
6867
})
6968
else
70-
nix-ld-rs
69+
nix-ld

tests/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ fn test_ld_path_restore(libtest: &str, _dt_needed_bin: &Path) {
117117

118118
// Utilities
119119

120-
const EXE: &str = env!("CARGO_BIN_EXE_nix-ld-rs");
120+
const EXE: &str = env!("CARGO_BIN_EXE_nix-ld");
121121
const TARGET: &str = env!("NIX_LD_TEST_TARGET");
122122

123123
lazy_static! {

0 commit comments

Comments
 (0)