fluffychat: 1.22.1 -> 1.23.0 (#364091)
[NixPkgs.git] / pkgs / by-name / au / auto-patchelf / package.nix
blobadff3a5e40c0ce0b93a143c9d1496e3723af06c3
2   stdenv,
3   python3,
4   lib,
5 }:
7 let
8   pythonEnv = python3.withPackages (ps: [ ps.pyelftools ]);
11 # Note: Not using python3Packages.buildPythonApplication because of dependency propagation.
12 stdenv.mkDerivation {
13   pname = "auto-patchelf";
14   version = "0-unstable-2024-08-14";
16   buildInputs = [ pythonEnv ];
18   src = ./source;
20   buildPhase = ''
21     runHook preBuild
23     substituteInPlace auto-patchelf.py --replace-fail "@defaultBintools@" "$NIX_BINTOOLS"
25     runHook postBuild
26   '';
28   installPhase = ''
29     runHook preInstall
31     install -Dm755 auto-patchelf.py $out/bin/auto-patchelf
33     runHook postInstall
34   '';
36   meta = {
37     description = "Automatically patch ELF binaries using patchelf";
38     mainProgram = "auto-patchelf";
39     license = lib.licenses.mit;
40     platforms = lib.platforms.unix;
41     maintainers = with lib.maintainers; [ Scrumplex ];
42   };