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.0 KiB
Nix
Raw Normal View History

{ stdenvNoCC, lib, fetchFromGitHub }:
2020-01-19 22:51:15 +00:00
stdenvNoCC.mkDerivation rec {
2020-01-19 22:51:15 +00:00
pname = "spdx-license-list-data";
2023-02-19 14:49:33 +00:00
version = "3.20";
2020-01-19 22:51:15 +00:00
src = fetchFromGitHub {
owner = "spdx";
repo = "license-list-data";
rev = "v${version}";
2023-02-19 14:49:33 +00:00
hash = "sha256-qMVUP1EpeeO+i5RfnAt/Idz+pR9dVyCT4Ss9lEJgj6k=";
2020-01-19 22:51:15 +00: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 22:51:15 +00:00
installPhase = ''
2021-03-18 09:57:29 +00: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 09:57:29 +00:00
runHook postInstall
2020-01-19 22:51:15 +00:00
'';
dontFixup = true;
2021-03-18 09:57:29 +00:00
meta = with lib; {
2020-01-19 22:51:15 +00:00
description = "Various data formats for the SPDX License List";
homepage = "https://github.com/spdx/license-list-data";
2021-03-18 09:57:29 +00:00
license = licenses.cc0;
maintainers = with maintainers; [ oxzi c0bw3b ];
2021-03-18 09:57:29 +00:00
platforms = platforms.all;
2020-01-19 22:51:15 +00:00
};
}