2021-06-30 01:21:29 +02:00
|
|
|
{ stdenvNoCC, lib, fetchFromGitHub }:
|
2020-01-19 23:51:15 +01:00
|
|
|
|
2021-06-30 01:21:29 +02: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
|
|
|
};
|
|
|
|
|
2022-02-26 12:00:42 +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
|
|
|
|
|
2022-02-26 12:00:42 +01:00
|
|
|
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
|
|
|
'';
|
|
|
|
|
2022-02-26 12:00:42 +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;
|
2022-02-26 12:00:42 +01:00
|
|
|
maintainers = with maintainers; [ oxzi c0bw3b ];
|
2021-03-18 10:57:29 +01:00
|
|
|
platforms = platforms.all;
|
2020-01-19 23:51:15 +01:00
|
|
|
};
|
|
|
|
}
|