···183 <programlisting language="bash">
184lib.mkPackageOption pkgs "GHC" {
185 default = [ "ghc" ];
186- example = "pkgs.haskell.package.ghc922.ghc.withPackages (hkgs: [ hkgs.primes ])";
187}
188# is like
189lib.mkOption {
190 type = lib.types.package;
191 default = pkgs.ghc;
192 defaultText = lib.literalExpression "pkgs.ghc";
193- example = lib.literalExpression "pkgs.haskell.package.ghc922.ghc.withPackages (hkgs: [ hkgs.primes ])";
194 description = "The GHC package to use.";
195}
196</programlisting>
···183 <programlisting language="bash">
184lib.mkPackageOption pkgs "GHC" {
185 default = [ "ghc" ];
186+ example = "pkgs.haskell.package.ghc923.ghc.withPackages (hkgs: [ hkgs.primes ])";
187}
188# is like
189lib.mkOption {
190 type = lib.types.package;
191 default = pkgs.ghc;
192 defaultText = lib.literalExpression "pkgs.ghc";
193+ example = lib.literalExpression "pkgs.haskell.package.ghc923.ghc.withPackages (hkgs: [ hkgs.primes ])";
194 description = "The GHC package to use.";
195}
196</programlisting>
+1-1
nixos/lib/test-driver/test_driver/machine.py
···682 with self.nested("waiting for {} to appear on tty {}".format(regexp, tty)):
683 retry(tty_matches)
684685- def send_chars(self, chars: List[str]) -> None:
686 with self.nested("sending keys ‘{}‘".format(chars)):
687 for char in chars:
688 self.send_key(char)
···682 with self.nested("waiting for {} to appear on tty {}".format(regexp, tty)):
683 retry(tty_matches)
684685+ def send_chars(self, chars: str) -> None:
686 with self.nested("sending keys ‘{}‘".format(chars)):
687 for char in chars:
688 self.send_key(char)
+5-5
nixos/tests/ecryptfs.nix
···1112 testScript = ''
13 def login_as_alice():
14- machine.wait_until_tty_matches(1, "login: ")
15 machine.send_chars("alice\n")
16- machine.wait_until_tty_matches(1, "Password: ")
17 machine.send_chars("foobar\n")
18- machine.wait_until_tty_matches(1, "alice\@machine")
192021 def logout():
22 machine.send_chars("logout\n")
23- machine.wait_until_tty_matches(1, "login: ")
242526 machine.wait_for_unit("default.target")
···36 with subtest("Log alice in (ecryptfs passwhrase is wrapped during first login)"):
37 login_as_alice()
38 machine.send_chars("logout\n")
39- machine.wait_until_tty_matches(1, "login: ")
4041 # Why do I need to do this??
42 machine.succeed("su alice -c ecryptfs-umount-private || true")
···1112 testScript = ''
13 def login_as_alice():
14+ machine.wait_until_tty_matches("1", "login: ")
15 machine.send_chars("alice\n")
16+ machine.wait_until_tty_matches("1", "Password: ")
17 machine.send_chars("foobar\n")
18+ machine.wait_until_tty_matches("1", "alice\@machine")
192021 def logout():
22 machine.send_chars("logout\n")
23+ machine.wait_until_tty_matches("1", "login: ")
242526 machine.wait_for_unit("default.target")
···36 with subtest("Log alice in (ecryptfs passwhrase is wrapped during first login)"):
37 login_as_alice()
38 machine.send_chars("logout\n")
39+ machine.wait_until_tty_matches("1", "login: ")
4041 # Why do I need to do this??
42 machine.succeed("su alice -c ecryptfs-umount-private || true")
+3-3
nixos/tests/login.nix
···29 machine.wait_until_succeeds("pgrep -f 'agetty.*tty2'")
3031 with subtest("Log in as alice on a virtual console"):
32- machine.wait_until_tty_matches(2, "login: ")
33 machine.send_chars("alice\n")
34- machine.wait_until_tty_matches(2, "login: alice")
35 machine.wait_until_succeeds("pgrep login")
36- machine.wait_until_tty_matches(2, "Password: ")
37 machine.send_chars("foobar\n")
38 machine.wait_until_succeeds("pgrep -u alice bash")
39 machine.send_chars("touch done\n")
···29 machine.wait_until_succeeds("pgrep -f 'agetty.*tty2'")
3031 with subtest("Log in as alice on a virtual console"):
32+ machine.wait_until_tty_matches("2", "login: ")
33 machine.send_chars("alice\n")
34+ machine.wait_until_tty_matches("2", "login: alice")
35 machine.wait_until_succeeds("pgrep login")
36+ machine.wait_until_tty_matches("2", "Password: ")
37 machine.send_chars("foobar\n")
38 machine.wait_until_succeeds("pgrep -u alice bash")
39 machine.send_chars("touch done\n")
+11-11
nixos/tests/pam/pam-oath-login.nix
···77 machine.screenshot("postboot")
7879 with subtest("Invalid password"):
80- switch_to_tty(2)
81- enter_user_alice(2)
8283 machine.send_chars("${oathSnakeOilPassword1}\n")
84- machine.wait_until_tty_matches(2, "Password: ")
85 machine.send_chars("blorg\n")
86- machine.wait_until_tty_matches(2, "Login incorrect")
8788 with subtest("Invalid oath token"):
89- switch_to_tty(3)
90- enter_user_alice(3)
9192 machine.send_chars("000000\n")
93- machine.wait_until_tty_matches(3, "Login incorrect")
94- machine.wait_until_tty_matches(3, "login:")
9596 with subtest("Happy path: Both passwords are mandatory to get us in"):
97- switch_to_tty(4)
98- enter_user_alice(4)
99100 machine.send_chars("${oathSnakeOilPassword2}\n")
101- machine.wait_until_tty_matches(4, "Password: ")
102 machine.send_chars("${alicePassword}\n")
103104 machine.wait_until_succeeds("pgrep -u alice bash")
···77 machine.screenshot("postboot")
7879 with subtest("Invalid password"):
80+ switch_to_tty("2")
81+ enter_user_alice("2")
8283 machine.send_chars("${oathSnakeOilPassword1}\n")
84+ machine.wait_until_tty_matches("2", "Password: ")
85 machine.send_chars("blorg\n")
86+ machine.wait_until_tty_matches("2", "Login incorrect")
8788 with subtest("Invalid oath token"):
89+ switch_to_tty("3")
90+ enter_user_alice("3")
9192 machine.send_chars("000000\n")
93+ machine.wait_until_tty_matches("3", "Login incorrect")
94+ machine.wait_until_tty_matches("3", "login:")
9596 with subtest("Happy path: Both passwords are mandatory to get us in"):
97+ switch_to_tty("4")
98+ enter_user_alice("4")
99100 machine.send_chars("${oathSnakeOilPassword2}\n")
101+ machine.wait_until_tty_matches("4", "Password: ")
102 machine.send_chars("${alicePassword}\n")
103104 machine.wait_until_succeeds("pgrep -u alice bash")
···54 # skip interactive browser check
55 buildFlags = [ "nobrowsers" ];
5657+ # Workaround build failure on -fno-common toolchains:
58+ # ld: cexp.o:(.bss+0x40): multiple definition of `obstck'; cccp.o:(.bss+0x0): first defined here
59+ NIX_CFLAGS_COMPILE = "-fcommon";
6061 preConfigure=''
62 configureFlagsArray=(
+1-1
pkgs/development/compilers/ghc/8.10.7.nix
···234 # GHC is a bit confused on its cross terminology, as these would normally be
235 # the *host* tools.
236 export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
237- export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
238 # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
239 export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${lib.optionalString useLdGold ".gold"}"
240 export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
···234 # GHC is a bit confused on its cross terminology, as these would normally be
235 # the *host* tools.
236 export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
237+ export CXX="${targetCC}/bin/${targetCC.targetPrefix}c++"
238 # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
239 export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${lib.optionalString useLdGold ".gold"}"
240 export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
+1-1
pkgs/development/compilers/ghc/8.8.4.nix
···215 # GHC is a bit confused on its cross terminology, as these would normally be
216 # the *host* tools.
217 export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
218- export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
219 # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
220 export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${lib.optionalString useLdGold ".gold"}"
221 export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
···215 # GHC is a bit confused on its cross terminology, as these would normally be
216 # the *host* tools.
217 export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
218+ export CXX="${targetCC}/bin/${targetCC.targetPrefix}c++"
219 # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
220 export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${lib.optionalString useLdGold ".gold"}"
221 export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
+1-1
pkgs/development/compilers/ghc/9.0.2.nix
···217 # GHC is a bit confused on its cross terminology, as these would normally be
218 # the *host* tools.
219 export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
220- export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
221 # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
222 export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${lib.optionalString useLdGold ".gold"}"
223 export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
···217 # GHC is a bit confused on its cross terminology, as these would normally be
218 # the *host* tools.
219 export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
220+ export CXX="${targetCC}/bin/${targetCC.targetPrefix}c++"
221 # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
222 export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${lib.optionalString useLdGold ".gold"}"
223 export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
···6, xattr, autoSignDarwinBinariesHook
7, bash
8009, libiconv ? null, ncurses
10, glibcLocales ? null
11···171assert stdenv.targetPlatform.isDarwin -> buildTargetLlvmPackages.clang == llvmPackages.clang;
172173stdenv.mkDerivation (rec {
174- version = "9.2.2";
175 pname = "${targetPrefix}ghc${variantSuffix}";
176177 src = fetchurl {
178 url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
179- sha256 = "902463a4cc6ee479af9358b9f8b2ee3237b03e934a1ea65b6d1fcf3e0d749ea6";
180 };
181182 enableParallelBuilding = true;
···197 # GHC is a bit confused on its cross terminology, as these would normally be
198 # the *host* tools.
199 export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
200- export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
201 # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
202 export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${lib.optionalString useLdGold ".gold"}"
203 export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
···218 '' + ''
219220 echo -n "${buildMK}" > mk/build.mk
000221 sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
222 '' + lib.optionalString (stdenv.isLinux && hostPlatform.libc == "glibc") ''
223 export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"
···283 dontAddExtraLibs = true;
284285 nativeBuildInputs = [
0286 perl autoconf automake m4 python3
287 ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
288 ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
···6, xattr, autoSignDarwinBinariesHook
7, bash
89+, autoreconfHook # GHC 9.2.3 tarballs don't have autoconf run on them
10+11, libiconv ? null, ncurses
12, glibcLocales ? null
13···173assert stdenv.targetPlatform.isDarwin -> buildTargetLlvmPackages.clang == llvmPackages.clang;
174175stdenv.mkDerivation (rec {
176+ version = "9.2.3";
177 pname = "${targetPrefix}ghc${variantSuffix}";
178179 src = fetchurl {
180 url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
181+ sha256 = "50ecdc2bef013e518f9a62a15245d7db0e4409d737c43b1cea7306fd82e1669e";
182 };
183184 enableParallelBuilding = true;
···199 # GHC is a bit confused on its cross terminology, as these would normally be
200 # the *host* tools.
201 export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
202+ export CXX="${targetCC}/bin/${targetCC.targetPrefix}c++"
203 # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
204 export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${lib.optionalString useLdGold ".gold"}"
205 export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
···220 '' + ''
221222 echo -n "${buildMK}" > mk/build.mk
223+ # GHC 9.2.3 tarball is not properly prepared
224+ ./boot
225+226 sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
227 '' + lib.optionalString (stdenv.isLinux && hostPlatform.libc == "glibc") ''
228 export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"
···288 dontAddExtraLibs = true;
289290 nativeBuildInputs = [
291+ autoreconfHook # GHC 9.2.3 tarball hasn't autoconf run on it
292 perl autoconf automake m4 python3
293 ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
294 ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
+1-1
pkgs/development/compilers/ghc/head.nix
···205 # GHC is a bit confused on its cross terminology, as these would normally be
206 # the *host* tools.
207 export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
208- export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
209 # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
210 # and more generally have a faster linker.
211 export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${lib.optionalString useLdGold ".gold"}"
···205 # GHC is a bit confused on its cross terminology, as these would normally be
206 # the *host* tools.
207 export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
208+ export CXX="${targetCC}/bin/${targetCC.targetPrefix}c++"
209 # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
210 # and more generally have a faster linker.
211 export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${lib.optionalString useLdGold ".gold"}"
···1{ lib
2, stdenv
3-, supportedGhcVersions ? [ "884" "8107" "902" "922" ]
4, dynamic ? false
5, haskellPackages
6, haskell
···8#
9# The recommended way to override this package is
10#
11-# pkgs.haskell-language-server.override { supportedGhcVersions = [ "901" ]; }
12#
13# for example. Read more about this in the haskell-language-server section of the nixpkgs manual.
14#
···1{ lib
2, stdenv
3+, supportedGhcVersions ? [ "884" "8107" "902" "923" ]
4, dynamic ? false
5, haskellPackages
6, haskell
···8#
9# The recommended way to override this package is
10#
11+# pkgs.haskell-language-server.override { supportedGhcVersions = [ "902" ]; }
12#
13# for example. Read more about this in the haskell-language-server section of the nixpkgs manual.
14#
+21-4
pkgs/misc/arm-trusted-firmware/default.nix
···1{ lib, stdenv, fetchFromGitHub, openssl, pkgsCross, buildPackages
23-# Warning: this blob runs on the main CPU (not the GPU) at privilege
4-# level EL3, which is above both the kernel and the hypervisor.
000005, unfreeIncludeHDCPBlob ? true
6}:
7···9 buildArmTrustedFirmware = { filesToInstall
10 , installDir ? "$out"
11 , platform ? null
012 , extraMakeFlags ? []
13 , extraMeta ? {}
14 , version ? "2.6"
15 , ... } @ args:
0000016 stdenv.mkDerivation ({
1718 pname = "arm-trusted-firmware${lib.optionalString (platform != null) "-${platform}"}";
···25 sha256 = "sha256-qT9DdTvMcUrvRzgmVf2qmKB+Rb1WOB4p1rM+fsewGcg=";
26 };
2728- patches = lib.optionals (!unfreeIncludeHDCPBlob) [
29 # this is a rebased version of https://gitlab.com/vicencb/kevinboot/-/blob/master/atf.patch
30 ./remove-hdcp-blob.patch
31 ];
32000033 depsBuildBuild = [ buildPackages.stdenv.cc ];
3435 # For Cortex-M0 firmware in RK3399
···60 meta = with lib; {
61 homepage = "https://github.com/ARM-software/arm-trusted-firmware";
62 description = "A reference implementation of secure world software for ARMv8-A";
63- license = (if unfreeIncludeHDCPBlob then [ licenses.unfreeRedistributable ] else []) ++ [ licenses.bsd3 ];
64 maintainers = with maintainers; [ lopsided98 ];
65 } // extraMeta;
66 } // builtins.removeAttrs args [ "extraMeta" ]);
···111 platform = "rk3328";
112 extraMeta.platforms = ["aarch64-linux"];
113 filesToInstall = [ "build/${platform}/release/bl31/bl31.elf"];
0114 };
115116 armTrustedFirmwareRK3399 = buildArmTrustedFirmware rec {
···118 platform = "rk3399";
119 extraMeta.platforms = ["aarch64-linux"];
120 filesToInstall = [ "build/${platform}/release/bl31/bl31.elf"];
0121 };
122123 armTrustedFirmwareS905 = buildArmTrustedFirmware rec {
···1{ lib, stdenv, fetchFromGitHub, openssl, pkgsCross, buildPackages
23+# Warning: this blob (hdcp.bin) runs on the main CPU (not the GPU) at
4+# privilege level EL3, which is above both the kernel and the
5+# hypervisor.
6+#
7+# This parameter applies only to platforms which are believed to use
8+# hdcp.bin. On all other platforms, or if unfreeIncludeHDCPBlob=false,
9+# hdcp.bin will be deleted before building.
10, unfreeIncludeHDCPBlob ? true
11}:
12···14 buildArmTrustedFirmware = { filesToInstall
15 , installDir ? "$out"
16 , platform ? null
17+ , platformCanUseHDCPBlob ? false # set this to true if the platform is able to use hdcp.bin
18 , extraMakeFlags ? []
19 , extraMeta ? {}
20 , version ? "2.6"
21 , ... } @ args:
22+23+ # delete hdcp.bin if either: the platform is thought to
24+ # not need it or unfreeIncludeHDCPBlob is false
25+ let deleteHDCPBlobBeforeBuild = !platformCanUseHDCPBlob || !unfreeIncludeHDCPBlob; in
26+27 stdenv.mkDerivation ({
2829 pname = "arm-trusted-firmware${lib.optionalString (platform != null) "-${platform}"}";
···36 sha256 = "sha256-qT9DdTvMcUrvRzgmVf2qmKB+Rb1WOB4p1rM+fsewGcg=";
37 };
3839+ patches = lib.optionals deleteHDCPBlobBeforeBuild [
40 # this is a rebased version of https://gitlab.com/vicencb/kevinboot/-/blob/master/atf.patch
41 ./remove-hdcp-blob.patch
42 ];
4344+ postPatch = lib.optionalString deleteHDCPBlobBeforeBuild ''
45+ rm plat/rockchip/rk3399/drivers/dp/hdcp.bin
46+ '';
47+48 depsBuildBuild = [ buildPackages.stdenv.cc ];
4950 # For Cortex-M0 firmware in RK3399
···75 meta = with lib; {
76 homepage = "https://github.com/ARM-software/arm-trusted-firmware";
77 description = "A reference implementation of secure world software for ARMv8-A";
78+ license = [ licenses.bsd3 ] ++ lib.optionals (!deleteHDCPBlobBeforeBuild) [ licenses.unfreeRedistributable ];
79 maintainers = with maintainers; [ lopsided98 ];
80 } // extraMeta;
81 } // builtins.removeAttrs args [ "extraMeta" ]);
···126 platform = "rk3328";
127 extraMeta.platforms = ["aarch64-linux"];
128 filesToInstall = [ "build/${platform}/release/bl31/bl31.elf"];
129+ platformCanUseHDCPBlob = true;
130 };
131132 armTrustedFirmwareRK3399 = buildArmTrustedFirmware rec {
···134 platform = "rk3399";
135 extraMeta.platforms = ["aarch64-linux"];
136 filesToInstall = [ "build/${platform}/release/bl31/bl31.elf"];
137+ platformCanUseHDCPBlob = true;
138 };
139140 armTrustedFirmwareS905 = buildArmTrustedFirmware rec {