distribution-nixpkgs 1.7.0 → 1.7.0.1
raw patch · 5 files changed
+51/−15 lines, 5 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +10/−0
- distribution-nixpkgs.cabal +6/−5
- src/Distribution/Nixpkgs/Meta.hs +17/−8
- test/data/all-system-tuples.json +1/−1
- test/hspec.hs +17/−1
CHANGELOG.md view
@@ -1,5 +1,15 @@ # Revision history for distribution-nixpkgs +## 1.7.0.1++* Adapt test suite to changed representation of some `Platform`s in Cabal 3.8.+* Update test data to include new nixpkgs architectures `rx`, `microblaze` and+ `microblazeel`.+* The distribution-nixpkgs repository has been merged into the+ [cabal2nix](https://github.com/NixOS/cabal2nix) repository.+ All URLs in the cabal file have been updated and the distribution-nixpkgs+ repository will be archived.+ ## 1.7.0 * `Distribution.Nixpkgs.Meta`
distribution-nixpkgs.cabal view
@@ -1,15 +1,15 @@ name: distribution-nixpkgs-version: 1.7.0+version: 1.7.0.1 synopsis: Types and functions to manipulate the Nixpkgs distribution description: Types and functions to represent, query, and manipulate the Nixpkgs distribution. license: BSD3 license-file: LICENSE author: Peter Simons <simons@cryp.to> maintainer: sternenseemann <sternenseemann@systemli.org>-tested-with: GHC == 8.6.5 || == 8.8.4 || == 8.10.7 || == 9.0.2 || == 9.2.2+tested-with: GHC == 8.8.4 || == 8.10.7 || == 9.0.2 || == 9.2.2 category: Distribution, Nix-homepage: https://github.com/NixOS/distribution-nixpkgs-bug-reports: https://github.com/NixOS/distribution-nixpkgs/issues+homepage: https://github.com/NixOS/cabal2nix/tree/master/distribution-nixpkgs#readme+bug-reports: https://github.com/NixOS/cabal2nix/issues build-type: Simple cabal-version: >= 1.10 data-files: derivation-attr-paths.nix@@ -19,7 +19,8 @@ source-repository head type: git- location: https://github.com/NixOS/distribution-nixpkgs+ location: https://github.com/NixOS/cabal2nix+ subdir: distribution-nixpkgs library exposed-modules: Distribution.Nixpkgs.Hashes
src/Distribution/Nixpkgs/Meta.hs view
@@ -217,16 +217,20 @@ -- -- >>> :set -XOverloadedStrings -- >>> :{--- print (pPrint (Meta "http://example.org" "an example package" (Unknown Nothing)--- (Just (Set.singleton (NixpkgsPlatformSingle (Platform X86_64 Linux))))--- Nothing--- (Just Set.empty)--- (Just "example-binary")--- (Set.fromList ["joe","jane"])--- True))+-- let meta = nullMeta+-- & homepage .~ "http://example.org"+-- & description .~ "An example package"+-- & license .~ Unknown Nothing+-- & platforms .~ Just (Set.singleton (NixpkgsPlatformSingle (Platform X86_64 Linux)))+-- & badPlatforms .~ Nothing+-- & hydraPlatforms .~ Just Set.empty+-- & mainProgram .~ Just "example-binary"+-- & maintainers .~ Set.fromList ["joe", "jane"]+-- & broken .~ True+-- in print $ pPrint meta -- :} -- homepage = "http://example.org";--- description = "an example package";+-- description = "An example package"; -- license = "unknown"; -- platforms = [ "x86_64-linux" ]; -- hydraPlatforms = lib.platforms.none;@@ -412,6 +416,11 @@ renderMaintainers = map (pPrint . toPath) . toAscListSortedOn (view ident) where toPath m = path # [ ident # "lib", ident # "maintainers", m] +-- | 'Meta' record with no field set, i.e. evaluating any will throw:+--+-- >>> nullMeta ^. homepage+-- "*** Exception: undefined Meta.homepage+-- ... nullMeta :: Meta nullMeta = Meta { _homepage = error "undefined Meta.homepage"
test/data/all-system-tuples.json view
@@ -1,1 +1,1 @@-["aarch64-darwin","aarch64-genode","aarch64-linux","aarch64-netbsd","aarch64-none","aarch64_be-none","arm-none","armv5tel-linux","armv6l-linux","armv6l-netbsd","armv6l-none","armv7a-darwin","armv7a-linux","armv7a-netbsd","armv7l-linux","armv7l-netbsd","avr-none","i686-cygwin","i686-darwin","i686-freebsd","i686-genode","i686-linux","i686-netbsd","i686-none","i686-openbsd","i686-windows","js-ghcjs","m68k-linux","m68k-netbsd","m68k-none","mips-linux","mips64-linux","mips64el-linux","mipsel-linux","mipsel-netbsd","mmix-mmixware","msp430-none","or1k-none","powerpc-netbsd","powerpc-none","powerpc64-linux","powerpc64le-linux","powerpcle-none","riscv32-linux","riscv32-netbsd","riscv32-none","riscv64-linux","riscv64-netbsd","riscv64-none","s390-linux","s390-none","s390x-linux","s390x-none","vc4-none","wasm32-wasi","wasm64-wasi","x86_64-cygwin","x86_64-darwin","x86_64-freebsd","x86_64-genode","x86_64-linux","x86_64-netbsd","x86_64-none","x86_64-openbsd","x86_64-redox","x86_64-solaris","x86_64-windows"]+["aarch64-darwin","aarch64-genode","aarch64-linux","aarch64-netbsd","aarch64-none","aarch64_be-none","arm-none","armv5tel-linux","armv6l-linux","armv6l-netbsd","armv6l-none","armv7a-darwin","armv7a-linux","armv7a-netbsd","armv7l-linux","armv7l-netbsd","avr-none","i686-cygwin","i686-darwin","i686-freebsd","i686-genode","i686-linux","i686-netbsd","i686-none","i686-openbsd","i686-windows","js-ghcjs","m68k-linux","m68k-netbsd","m68k-none","microblaze-linux","microblaze-none","microblazeel-linux","microblazeel-none","mips-linux","mips64-linux","mips64el-linux","mipsel-linux","mipsel-netbsd","mmix-mmixware","msp430-none","or1k-none","powerpc-netbsd","powerpc-none","powerpc64-linux","powerpc64le-linux","powerpcle-none","riscv32-linux","riscv32-netbsd","riscv32-none","riscv64-linux","riscv64-netbsd","riscv64-none","rx-none","s390-linux","s390-none","s390x-linux","s390x-none","vc4-none","wasm32-wasi","wasm64-wasi","x86_64-cygwin","x86_64-darwin","x86_64-freebsd","x86_64-genode","x86_64-linux","x86_64-netbsd","x86_64-none","x86_64-openbsd","x86_64-redox","x86_64-solaris","x86_64-windows"]
test/hspec.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} module Main ( main ) where import Control.DeepSeq@@ -29,7 +30,7 @@ ] describe "Platform rendering and parsing:" $ do- it "Checks cover all systems from all-system-tuples.json" $do+ it "Checks cover all systems from all-system-tuples.json" $ do let allSystemTuplesJson = "test/data/all-system-tuples.json" available <- doesFileExist allSystemTuplesJson if not available@@ -78,6 +79,10 @@ , ("m68k-linux", Platform M68k Linux) , ("m68k-netbsd", Platform M68k NetBSD) , ("m68k-none", Platform M68k (OtherOS "none"))+ , ("microblaze-linux", Platform (OtherArch "microblaze") Linux)+ , ("microblazeel-linux", Platform (OtherArch "microblazeel") Linux)+ , ("microblaze-none", Platform (OtherArch "microblaze") (OtherOS "none"))+ , ("microblazeel-none", Platform (OtherArch "microblazeel") (OtherOS "none")) , ("mips64el-linux", Platform (OtherArch "mips64el") Linux) , ("mipsel-linux", Platform (OtherArch "mipsel") Linux) , ("mipsel-netbsd", Platform (OtherArch "mipsel") NetBSD)@@ -95,13 +100,24 @@ , ("riscv64-linux", Platform (OtherArch "riscv64") Linux) , ("riscv64-netbsd", Platform (OtherArch "riscv64") NetBSD) , ("riscv64-none", Platform (OtherArch "riscv64") (OtherOS "none"))+ , ("rx-none", Platform (OtherArch "rx") (OtherOS "none")) , ("s390-linux", Platform S390 Linux) , ("s390-none", Platform S390 (OtherOS "none"))+#if MIN_VERSION_Cabal(3,8,1)+ , ("s390x-linux", Platform S390X Linux)+ , ("s390x-none", Platform S390X (OtherOS "none"))+#else , ("s390x-linux", Platform (OtherArch "s390x") Linux) , ("s390x-none", Platform (OtherArch "s390x") (OtherOS "none"))+#endif , ("vc4-none", Platform (OtherArch "vc4") (OtherOS "none"))+#if MIN_VERSION_Cabal(3,8,1)+ , ("wasm32-wasi", Platform Wasm32 Wasi)+ , ("wasm64-wasi", Platform (OtherArch "wasm64") Wasi)+#else , ("wasm32-wasi", Platform (OtherArch "wasm32") (OtherOS "wasi")) , ("wasm64-wasi", Platform (OtherArch "wasm64") (OtherOS "wasi"))+#endif , ("x86_64-cygwin", Platform X86_64 (OtherOS "cygwin")) , ("x86_64-darwin", Platform X86_64 OSX) , ("x86_64-freebsd", Platform X86_64 FreeBSD)