diff --git a/pkgs/by-name/ni/nix-universal-prefetch/package.nix b/pkgs/by-name/ni/nix-universal-prefetch/package.nix new file mode 100644 index 0000000000000..abc7ba55c9ff3 --- /dev/null +++ b/pkgs/by-name/ni/nix-universal-prefetch/package.nix @@ -0,0 +1,34 @@ +{ lib, stdenv +, fetchFromGitHub +, ruby +}: + +# No gems used, so mkDerivation is fine. +stdenv.mkDerivation rec { + pname = "nix-universal-prefetch"; + version = "0.4.0"; + + src = fetchFromGitHub { + owner = "Marcus-Arcadius"; + repo = "nix-universal-prefetch"; + rev = "v${version}"; + hash = "sha256-HGn4qHWqpUwlS3yQrD3j5oH0yOlphsoSPD2vkyyRv+0="; + }; + + installPhase = '' + mkdir -pv $out/bin + cp nix-universal-prefetch $out/bin/nix-universal-prefetch + substituteInPlace "$out/bin/nix-universal-prefetch" \ + --replace "/usr/bin/env nix-shell" "${ruby}/bin/ruby" + ''; + + meta = with lib; { + description = "Uses nixpkgs fetchers to figure out hashes"; + homepage = "https://github.com/squalus/nix-universal-prefetch"; + license = licenses.mit; + maintainers = with maintainers; [ squalus ]; + platforms = platforms.linux ++ platforms.darwin; + mainProgram = "nix-universal-prefetch"; + }; +} + diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 7c4e03a8cc9c3..d8dd65c654e18 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -955,7 +955,6 @@ mapAliases ({ ); nix-review = throw "'nix-review' has been renamed to/replaced by 'nixpkgs-review'"; # Converted to throw 2023-09-10 nix-template-rpm = throw "'nix-template-rpm' has been removed as it is broken and unmaintained"; # Added 2023-11-20 - nix-universal-prefetch = throw "The nix-universal-prefetch package was dropped since it was unmaintained."; # Added 2024-06-21 nixFlakes = nixVersions.stable; # Added 2021-05-21 nixStable = nixVersions.stable; # Added 2022-01-24 nixUnstable = throw "nixUnstable has been removed. For bleeding edge (Nix master, roughly weekly updated) use nixVersions.git, otherwise use nixVersions.latest."; # Converted to throw 2024-04-22