btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / sp / spdx-license-list-data / package.nix
blob84ec81af95176210104e9959a5a2dc7f6c3b1804
1 { stdenvNoCC, lib, fetchFromGitHub }:
3 stdenvNoCC.mkDerivation rec {
4   pname = "spdx-license-list-data";
5   version = "3.25.0";
7   src = fetchFromGitHub {
8     owner = "spdx";
9     repo = "license-list-data";
10     rev = "v${version}";
11     hash = "sha256-0UmeSwIWEYWyGkoVqh6cKv6lx+7fjBpDanr6yo3DN0s=";
12   };
14   # List of file formats to package.
15   _types = [ "html" "json" "jsonld" "rdfa" "rdfnt" "rdfturtle" "rdfxml" "template" "text" ];
17   outputs = [ "out" ] ++ _types;
19   dontPatch = true;
20   dontConfigure = true;
21   dontBuild = true;
23   installPhase = ''
24     runHook preInstall
26     mkdir -pv $out
27     for t in $_types
28     do
29       _outpath=''${!t}
30       mkdir -pv $_outpath
31       cp -ar $t $_outpath && echo "$t format installed"
32     done
34     runHook postInstall
35   '';
37   dontFixup = true;
39   meta = with lib; {
40     description = "Various data formats for the SPDX License List";
41     homepage = "https://github.com/spdx/license-list-data";
42     license = licenses.cc0;
43     maintainers = with maintainers; [ oxzi c0bw3b ];
44     platforms = platforms.all;
45   };