From dce7cfb4ef4ef02d4f46064128a03d2e2e1f0623 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Mon, 15 Jan 2024 12:34:43 +0100 Subject: [PATCH] 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. --- pkgs/by-name/ni/nix-lib-nmd/package.nix | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/pkgs/by-name/ni/nix-lib-nmd/package.nix b/pkgs/by-name/ni/nix-lib-nmd/package.nix index 1c7e43c4f875..6365989a2ae2 100644 --- a/pkgs/by-name/ni/nix-lib-nmd/package.nix +++ b/pkgs/by-name/ni/nix-lib-nmd/package.nix @@ -1,23 +1,20 @@ -{ lib, stdenv, fetchurl }: +{ lib, stdenv, fetchFromSourcehut }: let version = "0.5.0"; in stdenv.mkDerivation { pname = "nix-lib-nmd"; inherit version; - # TODO: Restore when Sourcehut once its back from DDoS attack. - # src = fetchFromSourcehut { - # owner = "~rycee"; - # repo = "nmd"; - # rev = "v${version}"; - # hash = "sha256-1glxIg/b+8qr+ZsSsBqZIqGpsYWzRuMyz74/sy765Uk="; - # }; - - src = fetchurl { - url = "https://rycee.net/tarballs/nmd-${version}.tar.gz"; - hash = "sha256-+65+VYFgnbFGzCyyQytyxVStSZwEP989qi/6EDOdA8A="; + src = fetchFromSourcehut { + owner = "~rycee"; + repo = "nmd"; + rev = "v${version}"; + hash = "sha256-x3zzcdvhJpodsmdjqB4t5mkVW22V3wqHLOun0KRBzUI="; }; + outputHashMode = "recursive"; + outputHash = "sha256-7BQmDJBo7rzv0rgfRiUAR3HvKkUHQ6x0umhBRhAAyzM="; + installPhase = '' mkdir -v "$out" cp -rv * "$out"