diff --git a/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/License.hs b/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/License.hs index 0ac50858..6c3b948b 100644 --- a/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/License.hs +++ b/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/License.hs @@ -53,7 +53,8 @@ fromSPDXLicense (SPDX.License expr) = SPDX.ELicense simpl Nothing -> -- Not handled: license exceptions case simpl of - SPDX.ELicenseId lid -> Known ("lib.licensesSpdx.\"" ++ prettyShow lid ++ "\"") + -- FIXME(@sternenseemann): this is not exactly Known, but a best effort lookup + SPDX.ELicenseId lid -> Known ("lib.meta.getLicenseFromSpdxId \"" ++ prettyShow lid ++ "\"") _ -> -- Not handed: the '+' suffix and user-defined licences references. -- Use the SPDX expression as a free-form license string. diff --git a/cabal2nix/test/golden-test-cases/pandoc.nix.golden b/cabal2nix/test/golden-test-cases/pandoc.nix.golden index 9401f421..53b29dfa 100644 --- a/cabal2nix/test/golden-test-cases/pandoc.nix.golden +++ b/cabal2nix/test/golden-test-cases/pandoc.nix.golden @@ -49,6 +49,6 @@ mkDerivation { ]; homepage = "https://pandoc.org"; description = "Conversion between markup formats"; - license = lib.licensesSpdx."GPL-2.0-or-later"; + license = lib.meta.getLicenseFromSpdxId "GPL-2.0-or-later"; mainProgram = "pandoc"; }