git.iko.soy/typeable/nixpkgs
on master help sign in
altermime: use mkDerivation
ea9c2faRobin Gloster
pkgs/tools/networking/altermime/default.nix+16−38
@@ -1,50 +1,28 @@
1−x@{builderDefsPackage
2−
3− , ...}:
4−builderDefsPackage
5−(a :
6−let
7− helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
1+{ stdenv, fetchurl }:
8− [];
9
2
10− buildInputs = map (n: builtins.getAttr n x)
3+stdenv.mkDerivation rec {
11− (builtins.attrNames (builtins.removeAttrs x helperArgNames));
12− sourceInfo = rec {
13− baseName="altermime";
4+ baseName = "altermime";
14− version="0.3.10";
5+ name = "${baseName}-${version}";
15− name="${baseName}-${version}";
6+ version = "0.3.10";
16− url="http://www.pldaniels.com/${baseName}/${name}.tar.gz";
17− hash="0vn3vmbcimv0n14khxr1782m76983zz9sf4j2kz5v86lammxld43";
18− };
19−in
20−rec {
21− src = a.fetchurl {
22− url = sourceInfo.url;
23− sha256 = sourceInfo.hash;
24− };
25
7
26− inherit (sourceInfo) name version;
8+ src = fetchurl {
27− inherit buildInputs;
9+ url = "http://www.pldaniels.com/${baseName}/${name}.tar.gz";
10+ sha256 = "0vn3vmbcimv0n14khxr1782m76983zz9sf4j2kz5v86lammxld43";
11+ };
28
12
29− patches = map a.fetchurl (import ./debian-patches.nix);
13+ patches = map fetchurl (import ./debian-patches.nix);
30
14
31− phaseNames = ["doPatch" "fixTarget" "doMakeInstall"];
15+ postPatch = ''
32− fixTarget = a.fullDepEntry (''
33 sed -i Makefile -e "s@/usr/local@$out@"
16 sed -i Makefile -e "s@/usr/local@$out@"
34 mkdir -p "$out/bin"
17 mkdir -p "$out/bin"
35− '') ["doUnpack" "minInit" "defEnsureDir"];
18+ '';
36−
19+
37 meta = {
20 meta = {
38 description = "MIME alteration tool";
21 description = "MIME alteration tool";
39− maintainers = with a.lib.maintainers;
22+ maintainers = with stdenv.lib.maintainers; [
40− [
41 raskin
23 raskin
42 ];
24 ];
43− platforms = with a.lib.platforms;
25+ platforms = with stdenv.lib.platforms; linux;
44− linux;
45 downloadPage = "http://www.pldaniels.com/altermime/";
26 downloadPage = "http://www.pldaniels.com/altermime/";
46− inherit version;
47− updateWalker = true;
48 };
27 };
49−}) x
28+}
50−