Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

distribution-nixpkgs/test: update nixpkgs platform test data #634

Merged
merged 1 commit into from
Dec 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion distribution-nixpkgs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ To check if any new platforms need to be covered, do the following:

3. If the test suite fails, add test cases for all missing system tuples.

4. In all cases, change the dates of last update in `test/hspec.hs` and
4. In all cases, change the date of last update in
`src/Distribution/Nixpkgs/Meta.hs` to the current day.
2 changes: 1 addition & 1 deletion distribution-nixpkgs/src/Distribution/Nixpkgs/Meta.hs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ nixpkgsPlatformFromCabal (Platform arch os) = "\"" ++ nixArch ++ "-" ++ nixOs ++
-- using 'nixpkgsPlatformFromString' and rendering them via the 'Pretty'
-- instance of 'NixpkgsPlatform' should not change the system tuple
-- for tuples accepted by nixpkgs. This has been tested for all known tuples
-- (from @lib.platforms@ and @lib.systems.examples@) as of 2022-05-08.
-- (from @lib.platforms@ and @lib.systems.examples@) as of 2024-12-01.
-- Please open an issue if any newly added ones are not recognized properly.
--
-- __Warning__: 'nixpkgsPlatformFromString' consequently tries to preserve all
Expand Down
2 changes: 1 addition & 1 deletion distribution-nixpkgs/test/data/all-system-tuples.json
Original file line number Diff line number Diff line change
@@ -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","javascript-ghcjs","loongarch64-linux","m68k-linux","m68k-netbsd","m68k-none","microblaze-linux","microblaze-none","microblazeel-linux","microblazeel-none","mips-linux","mips-none","mips64-linux","mips64-none","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-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-freebsd","aarch64-genode","aarch64-linux","aarch64-netbsd","aarch64-none","aarch64-windows","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","javascript-ghcjs","loongarch64-linux","m68k-linux","m68k-netbsd","m68k-none","microblaze-linux","microblaze-none","microblazeel-linux","microblazeel-none","mips-linux","mips-none","mips64-linux","mips64-none","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-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"]
8 changes: 6 additions & 2 deletions distribution-nixpkgs/test/hspec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,20 @@ main = hspec $ do
it "is parsed correctly" $
nixpkgsPlatformFromString str `shouldBe` Just plat

-- All system tuples from lib.platforms as of 2022-05-08. Testing these allows
-- us to get notified about behavior change in Cabal as early as possible.
-- All system tuples from lib.platforms. Testing these allows us to
-- get notified about behavior change in Cabal as early as possible.
-- You can check if the list is up to date by running
-- regenerate-all-system-tuples.sh.
nixpkgsSystemMapping :: [(String, Platform)]
nixpkgsSystemMapping =
[ -- lib.platforms.all
("aarch64-darwin", Platform AArch64 OSX)
, ("aarch64-freebsd", Platform AArch64 FreeBSD)
, ("aarch64-genode", Platform AArch64 (OtherOS "genode"))
, ("aarch64-linux", Platform AArch64 Linux)
, ("aarch64-netbsd", Platform AArch64 NetBSD)
, ("aarch64-none", Platform AArch64 (OtherOS "none"))
, ("aarch64-windows", Platform AArch64 Windows)
, ("aarch64_be-none", Platform (OtherArch "aarch64_be") (OtherOS "none"))
, ("arm-none", Platform Arm (OtherOS "none"))
, ("armv5tel-linux", Platform (OtherArch "armv5tel") Linux)
Expand Down
Loading