Skip to content

Commit

Permalink
Merge pull request NixOS#598 from sternenseemann/distribution-nixpkgs…
Browse files Browse the repository at this point in the history
…-platforms

distribution-nixpkgs: match upstream rendering of JavaScript "arch"
  • Loading branch information
sternenseemann authored Mar 24, 2023
2 parents 5e183d1 + 78820b6 commit 4541e70
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
10 changes: 10 additions & 0 deletions distribution-nixpkgs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Revision history for distribution-nixpkgs

## Unreleased

* GHC and nixpkgs now
[use the system double `javascript-ghcjs`](https://github.com/NixOS/nixpkgs/commit/471b9cab41b218080f5e9f4abbc83eaaa60c6abf)
instead of `js-ghcjs` to match Cabal's default rendering. With this release,
`distribution-nixpkgs` does the same.
Note that this means that this release needs to be used with nixpkgs unstable
after [97d55ec](https://github.com/NixOS/nixpkgs/commit/97d55ec923b0cd3798a6a84e2e0a6b2c6b54f6a9)
or nixpkgs stable 23.05 or newer.

## 1.7.0.1

* Adapt test suite to changed representation of some `Platform`s in Cabal 3.8.
Expand Down
1 change: 0 additions & 1 deletion distribution-nixpkgs/src/Distribution/Nixpkgs/Meta.hs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ nixpkgsPlatformFromCabal (Platform arch os) = "\"" ++ nixArch ++ "-" ++ nixOs ++
I386 -> "i686" -- rendered as i386 by default
PPC -> "powerpc" -- rendered as ppc by default
PPC64 -> "powerpc64" -- rendered as ppc64 by default
JavaScript -> "js" -- rendered as javascript by default
_ -> CabalPretty.prettyShow arch
nixOs =
case os of
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","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"]
["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-freebsd13","i686-genode","i686-linux","i686-netbsd","i686-none","i686-openbsd","i686-windows","javascript-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","mipsisa32r6-linux","mipsisa32r6el-linux","mipsisa64r6-linux","mipsisa64r6el-linux","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-freebsd13","x86_64-genode","x86_64-linux","x86_64-netbsd","x86_64-none","x86_64-openbsd","x86_64-redox","x86_64-solaris","x86_64-windows"]
10 changes: 7 additions & 3 deletions distribution-nixpkgs/test/hspec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ nixpkgsSystemMapping =
, ("avr-none", Platform (OtherArch "avr") (OtherOS "none"))
, ("i686-cygwin", Platform I386 (OtherOS "cygwin"))
, ("i686-darwin", Platform I386 OSX)
, ("i686-freebsd", Platform I386 FreeBSD)
, ("i686-freebsd13", Platform I386 (OtherOS "freebsd13"))
, ("i686-genode", Platform I386 (OtherOS "genode"))
, ("i686-linux", Platform I386 Linux)
, ("i686-netbsd", Platform I386 NetBSD)
, ("i686-none", Platform I386 (OtherOS "none"))
, ("i686-openbsd", Platform I386 OpenBSD)
, ("i686-windows", Platform I386 Windows)
, ("js-ghcjs", Platform JavaScript Ghcjs)
, ("javascript-ghcjs", Platform JavaScript Ghcjs)
, ("m68k-linux", Platform M68k Linux)
, ("m68k-netbsd", Platform M68k NetBSD)
, ("m68k-none", Platform M68k (OtherOS "none"))
Expand Down Expand Up @@ -120,7 +120,7 @@ nixpkgsSystemMapping =
#endif
, ("x86_64-cygwin", Platform X86_64 (OtherOS "cygwin"))
, ("x86_64-darwin", Platform X86_64 OSX)
, ("x86_64-freebsd", Platform X86_64 FreeBSD)
, ("x86_64-freebsd13", Platform X86_64 (OtherOS "freebsd13"))
, ("x86_64-genode", Platform X86_64 (OtherOS "genode"))
, ("x86_64-linux", Platform X86_64 Linux)
, ("x86_64-netbsd", Platform X86_64 NetBSD)
Expand All @@ -132,6 +132,10 @@ nixpkgsSystemMapping =
-- lib.systems.examples
, ("mips-linux", Platform Mips Linux)
, ("mips64-linux", Platform (OtherArch "mips64") Linux)
, ("mipsisa32r6-linux", Platform (OtherArch "mipsisa32r6") Linux)
, ("mipsisa32r6el-linux", Platform (OtherArch "mipsisa32r6el") Linux)
, ("mipsisa64r6-linux", Platform (OtherArch "mipsisa64r6") Linux)
, ("mipsisa64r6el-linux", Platform (OtherArch "mipsisa64r6el") Linux)
]

platformMapping :: [(String, NixpkgsPlatform)]
Expand Down

0 comments on commit 4541e70

Please sign in to comment.