altermime: fix darwin build

This commit is contained in:
Ben Siraphob 2021-03-18 22:26:03 +07:00
parent bfde7b6b8d
commit 28a16d05aa

View file

@ -1,12 +1,11 @@
{ lib, stdenv, fetchurl }: { lib, gccStdenv, fetchurl }:
stdenv.mkDerivation rec { gccStdenv.mkDerivation rec {
baseName = "altermime"; pname = "altermime";
name = "${baseName}-${version}";
version = "0.3.11"; version = "0.3.11";
src = fetchurl { src = fetchurl {
url = "https://pldaniels.com/${baseName}/${name}.tar.gz"; url = "https://pldaniels.com/${pname}/${pname}-${version}.tar.gz";
sha256 = "15zxg6spcmd35r6xbidq2fgcg2nzyv1sbbqds08lzll70mqx4pj7"; sha256 = "15zxg6spcmd35r6xbidq2fgcg2nzyv1sbbqds08lzll70mqx4pj7";
}; };
@ -19,14 +18,14 @@ stdenv.mkDerivation rec {
]; ];
postPatch = '' postPatch = ''
sed -i Makefile -e "s@/usr/local@$out@" mkdir -p $out/bin
mkdir -p "$out/bin" substituteInPlace Makefile --replace "/usr/local" "$out"
''; '';
meta = with lib; { meta = with lib; {
description = "MIME alteration tool"; description = "MIME alteration tool";
maintainers = [ maintainers.raskin ]; maintainers = [ maintainers.raskin ];
platforms = platforms.linux; platforms = platforms.all;
license.fullName = "alterMIME LICENSE"; license.fullName = "alterMIME LICENSE";
downloadPage = "https://pldaniels.com/altermime/"; downloadPage = "https://pldaniels.com/altermime/";
}; };