data/mime-types: make derivation fixed-output

This commit is contained in:
volth 2018-02-22 17:14:43 +00:00 committed by GitHub
parent d328ba753e
commit e28cf0cbfb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,21 +1,15 @@
{ stdenv, fetchurl }: { stdenv, fetchzip }:
stdenv.mkDerivation rec { let
name = "mime-types-${version}";
version = "9"; version = "9";
in fetchzip rec {
src = fetchurl { name = "mime-types-${version}";
url = "https://mirrors.kernel.org/gentoo/distfiles/${name}.tar.bz2"; url = "https://mirrors.kernel.org/gentoo/distfiles/${name}.tar.bz2";
sha256 = "0pib8v0f5xwwm3xj2ygdi2dlxxvbq6p95l3fah5f66qj9xrqlqxl"; postFetch = ''
}; mkdir -p $out/etc
tar xjvf $downloadedFile --directory=$out/etc --strip-components=1
dontBuild = true;
installPhase = ''
runHook preInstall
install -Dm644 -t $out/etc mime.types
runHook postInstall
''; '';
sha256 = "0gyla4wfiaccs0qh0hw7n08kdpnkkssglcg0z2jblb2lsdr4qna0";
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "A database of common mappings of file extensions to MIME types"; description = "A database of common mappings of file extensions to MIME types";