From 88198555d040aa6c4ce3e50e878dc24bb51e4001 Mon Sep 17 00:00:00 2001 From: c0bw3b Date: Sat, 26 Feb 2022 12:00:42 +0100 Subject: [PATCH 1/2] spdx-license-list-data: make all formats available Since the whole lot is quite big, split this derivation into multiple outputs (one output for each file format). And update to v3.16 Co-authored-by: Alvar Penning --- .../misc/spdx-license-list-data/default.nix | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/pkgs/data/misc/spdx-license-list-data/default.nix b/pkgs/data/misc/spdx-license-list-data/default.nix index f7f5f64bfd7e..525e96de8e9b 100644 --- a/pkgs/data/misc/spdx-license-list-data/default.nix +++ b/pkgs/data/misc/spdx-license-list-data/default.nix @@ -2,28 +2,45 @@ stdenvNoCC.mkDerivation rec { pname = "spdx-license-list-data"; - version = "3.15"; + version = "3.16"; src = fetchFromGitHub { owner = "spdx"; repo = "license-list-data"; rev = "v${version}"; - sha256 = "0r88j00shmhayfq8avswaxsaj1my1vq540rg0srma29862vrjpfk"; + hash = "sha256-FPN9EIwXtz0b1tUZ/AOWK2zj2nfd5+POGmRC52mSzcA="; }; + # 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; + installPhase = '' runHook preInstall - install -vDt $out/json json/licenses.json + mkdir -pv $out + for t in $_types + do + _outpath=''${!t} + mkdir -pv $_outpath + cp -ar $t $_outpath && echo "$t format installed" + done runHook postInstall ''; + dontFixup = true; + meta = with lib; { description = "Various data formats for the SPDX License List"; homepage = "https://github.com/spdx/license-list-data"; license = licenses.cc0; - maintainers = with maintainers; [ oxzi ]; + maintainers = with maintainers; [ oxzi c0bw3b ]; platforms = platforms.all; }; } From 68e8e30670f9cb1f433a06fb79452a3f71e13808 Mon Sep 17 00:00:00 2001 From: c0bw3b Date: Sat, 26 Feb 2022 12:38:27 +0100 Subject: [PATCH 2/2] platformio: use json output of spdx-license-list-data And update meta.homepage (permanent redirect on http://) --- pkgs/development/embedded/platformio/core.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/embedded/platformio/core.nix b/pkgs/development/embedded/platformio/core.nix index 31255aaca534..774b55338e0c 100644 --- a/pkgs/development/embedded/platformio/core.nix +++ b/pkgs/development/embedded/platformio/core.nix @@ -80,6 +80,7 @@ with python.pkgs; buildPythonApplication rec { pyserial requests semantic-version + spdx-license-list-data.json starlette tabulate uvicorn @@ -171,7 +172,7 @@ with python.pkgs; buildPythonApplication rec { postPatch = '' substitute platformio/package/manifest/schema.py platformio/package/manifest/schema.py \ - --subst-var-by SPDX_LICENSE_LIST_DATA '${spdx-license-list-data}' + --subst-var-by SPDX_LICENSE_LIST_DATA '${spdx-license-list-data.json}' substituteInPlace setup.py \ --replace "zeroconf==0.37.*" "zeroconf" @@ -180,7 +181,7 @@ with python.pkgs; buildPythonApplication rec { meta = with lib; { broken = stdenv.isAarch64; description = "An open source ecosystem for IoT development"; - homepage = "http://platformio.org"; + homepage = "https://platformio.org"; license = licenses.asl20; maintainers = with maintainers; [ mog makefu ]; };