Skip to content

Commit

Permalink
nix-universal-prefetch: init at 0.4.0
Browse files Browse the repository at this point in the history
This package was deleted in 578d7e7. This broke the Electron
update script.

This fixes the Electron update script.

Fixes NixOS#321490
  • Loading branch information
squalus committed Jul 11, 2024
1 parent 54bc082 commit 6757561
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
34 changes: 34 additions & 0 deletions pkgs/by-name/ni/nix-universal-prefetch/package.nix
Original file line number Diff line number Diff line change
@@ -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";
};
}

1 change: 0 additions & 1 deletion pkgs/top-level/aliases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6757561

Please # to comment.