nmd: turn into a fixed-output derivation

This should avoid the need for IFD. Also switch source fetch to
Sourcehut since it is back online.
This commit is contained in:
Robert Helgesson 2024-01-15 12:34:43 +01:00
parent edfd12c836
commit dce7cfb4ef

View file

@ -1,23 +1,20 @@
{ lib, stdenv, fetchurl }: { lib, stdenv, fetchFromSourcehut }:
let version = "0.5.0"; let version = "0.5.0";
in stdenv.mkDerivation { in stdenv.mkDerivation {
pname = "nix-lib-nmd"; pname = "nix-lib-nmd";
inherit version; inherit version;
# TODO: Restore when Sourcehut once its back from DDoS attack. src = fetchFromSourcehut {
# src = fetchFromSourcehut { owner = "~rycee";
# owner = "~rycee"; repo = "nmd";
# repo = "nmd"; rev = "v${version}";
# rev = "v${version}"; hash = "sha256-x3zzcdvhJpodsmdjqB4t5mkVW22V3wqHLOun0KRBzUI=";
# hash = "sha256-1glxIg/b+8qr+ZsSsBqZIqGpsYWzRuMyz74/sy765Uk=";
# };
src = fetchurl {
url = "https://rycee.net/tarballs/nmd-${version}.tar.gz";
hash = "sha256-+65+VYFgnbFGzCyyQytyxVStSZwEP989qi/6EDOdA8A=";
}; };
outputHashMode = "recursive";
outputHash = "sha256-7BQmDJBo7rzv0rgfRiUAR3HvKkUHQ6x0umhBRhAAyzM=";
installPhase = '' installPhase = ''
mkdir -v "$out" mkdir -v "$out"
cp -rv * "$out" cp -rv * "$out"