nixpkgs/pkgs/data/misc/spdx-license-list-data/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1 KiB
Nix
Raw Normal View History

{ stdenvNoCC, lib, fetchFromGitHub }:
2020-01-19 23:51:15 +01:00
stdenvNoCC.mkDerivation rec {
2020-01-19 23:51:15 +01:00
pname = "spdx-license-list-data";
2022-12-05 04:06:03 +01:00
version = "3.19";
2020-01-19 23:51:15 +01:00
src = fetchFromGitHub {
owner = "spdx";
repo = "license-list-data";
rev = "v${version}";
2022-12-05 04:06:03 +01:00
hash = "sha256-qT9Q6Mntnt9lOhYmGFJlkDyAHQ0CGQpWr1rLF08FGeg=";
2020-01-19 23:51:15 +01:00
};
# List of file formats to package.
_types = [ "html" "json" "jsonld" "rdfa" "rdfnt" "rdfturtle" "rdfxml" "template" "text" ];
outputs = [ "out" ] ++ _types;
dontPatch = true;
dontConfigure = true;
dontBuild = true;
2020-01-19 23:51:15 +01:00
installPhase = ''
2021-03-18 10:57:29 +01:00
runHook preInstall
mkdir -pv $out
for t in $_types
do
_outpath=''${!t}
mkdir -pv $_outpath
cp -ar $t $_outpath && echo "$t format installed"
done
2021-03-18 10:57:29 +01:00
runHook postInstall
2020-01-19 23:51:15 +01:00
'';
dontFixup = true;
2021-03-18 10:57:29 +01:00
meta = with lib; {
2020-01-19 23:51:15 +01:00
description = "Various data formats for the SPDX License List";
homepage = "https://github.com/spdx/license-list-data";
2021-03-18 10:57:29 +01:00
license = licenses.cc0;
maintainers = with maintainers; [ oxzi c0bw3b ];
2021-03-18 10:57:29 +01:00
platforms = platforms.all;
2020-01-19 23:51:15 +01:00
};
}