Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

data/mime-types: make derivation fixed-output

authored by volth and committed by GitHub e28cf0cb d328ba75

+9 -15
+9 -15
pkgs/data/misc/mime-types/default.nix
··· 1 - { stdenv, fetchurl }: 1 + { stdenv, fetchzip }: 2 2 3 - stdenv.mkDerivation rec { 4 - name = "mime-types-${version}"; 3 + let 5 4 version = "9"; 6 - 7 - src = fetchurl { 8 - url = "https://mirrors.kernel.org/gentoo/distfiles/${name}.tar.bz2"; 9 - sha256 = "0pib8v0f5xwwm3xj2ygdi2dlxxvbq6p95l3fah5f66qj9xrqlqxl"; 10 - }; 11 - 12 - dontBuild = true; 13 - 14 - installPhase = '' 15 - runHook preInstall 16 - install -Dm644 -t $out/etc mime.types 17 - runHook postInstall 5 + in fetchzip rec { 6 + name = "mime-types-${version}"; 7 + url = "https://mirrors.kernel.org/gentoo/distfiles/${name}.tar.bz2"; 8 + postFetch = '' 9 + mkdir -p $out/etc 10 + tar xjvf $downloadedFile --directory=$out/etc --strip-components=1 18 11 ''; 12 + sha256 = "0gyla4wfiaccs0qh0hw7n08kdpnkkssglcg0z2jblb2lsdr4qna0"; 19 13 20 14 meta = with stdenv.lib; { 21 15 description = "A database of common mappings of file extensions to MIME types";