diff options
Diffstat (limited to 'pkgs/os-specific')
45 files changed, 409 insertions, 599 deletions
diff --git a/pkgs/os-specific/bsd/netbsd/default.nix b/pkgs/os-specific/bsd/netbsd/default.nix index 2d1909547b61..c53b7e50b9f3 100644 --- a/pkgs/os-specific/bsd/netbsd/default.nix +++ b/pkgs/os-specific/bsd/netbsd/default.nix @@ -2,6 +2,9 @@ , yacc, flex, libressl, bash, less, writeText }: let + inherit (lib) optionalString replaceStrings; + inherit (stdenv) hostPlatform; + fetchNetBSD = path: version: sha256: fetchcvs { cvsRoot = ":pserver:anoncvs@anoncvs.NetBSD.org:/cvsroot"; module = "src/${path}"; @@ -9,20 +12,52 @@ let tag = "netbsd-${builtins.replaceStrings ["."] ["-"] version}-RELEASE"; }; + # Needed to support cross correctly. Splicing only happens when we + # do callPackage, but sense everything is here, it needs to be done + # by hand. All native build inputs should come from here. + nbBuildPackages = buildPackages.netbsd; + + MACHINE_ARCH = { + "i686" = "i386"; + }.${hostPlatform.parsed.cpu.name} or hostPlatform.parsed.cpu.name; + + MACHINE = { + "x86_64" = "amd64"; + "aarch64" = "evbarm64"; + "i686" = "i386"; + }.${hostPlatform.parsed.cpu.name} or hostPlatform.parsed.cpu.name; + netBSDDerivation = attrs: stdenv.mkDerivation ((rec { - name = "bsd-${attrs.pname or (baseNameOf attrs.path)}-netbsd-${attrs.version}"; + name = "netbsd-${attrs.pname or (baseNameOf attrs.path)}-${attrs.version}"; src = attrs.src or fetchNetBSD attrs.path attrs.version attrs.sha256; extraPaths = [ ]; setOutputFlags = false; - nativeBuildInputs = [ makeMinimal mandoc groff install stat - yacc flex tsort lorder ]; - buildInputs = [ compat ]; + nativeBuildInputs = [ yacc flex mandoc groff + nbBuildPackages.makeMinimal + nbBuildPackages.stat + nbBuildPackages.install + nbBuildPackages.tsort + nbBuildPackages.lorder ]; + buildInputs = [ nbPackages.compat ]; installFlags = [ "includes" ]; + # TODO: eventually move this to a make.conf + makeFlags = [ + "MACHINE=${MACHINE}" + "MACHINE_ARCH=${MACHINE_ARCH}" + + "AR=${stdenv.cc.targetPrefix}ar" + "CC=${stdenv.cc.targetPrefix}cc" + "CPP=${stdenv.cc.targetPrefix}cpp" + "CXX=${stdenv.cc.targetPrefix}c++" + "LD=${stdenv.cc.targetPrefix}ld" + "STRIP=${stdenv.cc.targetPrefix}strip" + ] ++ (attrs.makeFlags or []); # Definitions passed to share/mk/*.mk. Should be pretty simple - # eventually maybe move it to a configure script. + # TODO: don’t rely on DESTDIR, instead use prefix DESTDIR = "$(out)"; TOOLDIR = "$(out)"; USETOOLS = "never"; @@ -30,16 +65,21 @@ let NOGCCERROR = "yes"; LEX = "flex"; MKUNPRIVED = "yes"; - HOST_SH = "${bash}/bin/sh"; + HOST_SH = "${buildPackages.bash}/bin/sh"; OBJCOPY = if stdenv.isDarwin then "true" else "objcopy"; - MACHINE_ARCH = stdenv.hostPlatform.parsed.cpu.name; - MACHINE_CPU = stdenv.hostPlatform.parsed.cpu.name; + RPCGEN_CPP = "${stdenv.cc.targetPrefix}cpp"; + + MKPIC = if stdenv.isDarwin then "no" else "yes"; + MKRELRO = if stdenv.isDarwin then "no" else "yes"; INSTALL_FILE = "install -U -c"; INSTALL_DIR = "xinstall -U -d"; INSTALL_LINK = "install -U -l h"; INSTALL_SYMLINK = "install -U -l s"; + HOST_CC = "${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}cc"; + HOST_CXX = "${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}c++"; + # libs will be provided by cc-wrapper LIBCRT0 = ""; LIBCRTI = ""; @@ -82,7 +122,7 @@ let # NetBSD makefiles should be able to detect this # but without they end up using gcc on Darwin stdenv preConfigure = '' - export HAVE_${if stdenv.cc.isGNU then "GCC" else "LLVM"}=${lib.head (lib.splitString "." (lib.getVersion stdenv.cc.cc))} + export HAVE_${if stdenv.cc.isClang then "LLVM" else "GCC"}=${lib.head (lib.splitString "." (lib.getVersion stdenv.cc.cc))} # Parallel building. Needs the space. export makeFlags+=" -j $NIX_BUILD_CORES" @@ -125,15 +165,111 @@ let platforms = platforms.unix; license = licenses.bsd2; }; - }) // attrs); + }) // (removeAttrs attrs ["makeFlags"])); + + libutil = netBSDDerivation { + path = "lib/libutil"; + version = "8.0"; + sha256 = "077syyxd303m4x7avs5nxzk4c9n13d5lyk5aicsacqjvx79qrk3i"; + extraPaths = [ + (fetchNetBSD "common/lib/libutil" "8.0" "0q3ixrf36lip1dx0gafs0a03qfs5cs7n0myqq7af4jpjd6kh1831") + ]; + }; + + libc = netBSDDerivation { + path = "lib/libc"; + version = "8.0"; + sha256 = "0lgbc58qgn8kwm3l011x1ml1kgcf7jsgq7hbf0hxhlbvxq5bljl3"; + extraPaths = [ + (fetchNetBSD "common/lib/libc" "8.0" "1kbhj0vxixvdy9fvsr5y70ri4mlkmim1v9m98sqjlzc1vdiqfqc8") + ]; + }; + + make = netBSDDerivation { + path = "usr.bin/make"; + sha256 = "103643qs3w5kiahir6cca2rkm5ink81qbg071qyzk63qvspfq10c"; + version = "8.0"; + postPatch = '' + # make needs this to pick up our sys make files + export NIX_CFLAGS_COMPILE+=" -D_PATH_DEFSYSPATH=\"$out/share/mk\"" + + substituteInPlace $NETBSDSRCDIR/share/mk/bsd.prog.mk \ + --replace '-Wl,-dynamic-linker=''${_SHLINKER}' "" \ + --replace '-Wl,-rpath,''${SHLIBDIR}' "" + substituteInPlace $NETBSDSRCDIR/share/mk/bsd.lib.mk \ + --replace '_INSTRANLIB=''${empty(PRESERVE):?-a "''${RANLIB} -t":}' '_INSTRANLIB=' + substituteInPlace $NETBSDSRCDIR/share/mk/bsd.kinc.mk \ + --replace /bin/rm rm + '' + lib.optionalString stdenv.isDarwin '' + substituteInPlace $NETBSDSRCDIR/share/mk/bsd.sys.mk \ + --replace '-Wl,--fatal-warnings' "" \ + --replace '-Wl,--warn-shared-textrel' "" + substituteInPlace $NETBSDSRCDIR/share/mk/bsd.lib.mk \ + --replace '-Wl,-soname,''${_LIB}.so.''${SHLIB_SOVERSION}' "" \ + --replace '-Wl,--whole-archive' "" \ + --replace '-Wl,--no-whole-archive' "" \ + --replace '-Wl,--warn-shared-textrel' "" \ + --replace '-Wl,-Map=''${_LIB}.so.''${SHLIB_SOVERSION}.map' "" \ + --replace '-Wl,-rpath,''${SHLIBDIR}' "" + ''; + postInstall = '' + make -C $NETBSDSRCDIR/share/mk FILESDIR=/share/mk install + ''; + extraPaths = [ + (fetchNetBSD "share/mk" "8.0" "033q4w3rmvwznz6m7fn9xcf13chyhwwl8ijj3a9mrn80fkwm55qs") + ]; + }; + + libcurses = netBSDDerivation { + path = "lib/libcurses"; + version = "8.0"; + sha256 = "0azhzh1910v24dqx45zmh4z4dl63fgsykajrbikx5xfvvmkcq7xs"; + buildInputs = [ nbPackages.libterminfo ]; + makeFlags = [ "INCSDIR=/include" ]; + NIX_CFLAGS_COMPILE = [ + "-D__scanflike(a,b)=" + "-D__va_list=va_list" + "-D__warn_references(a,b)=" + ] ++ lib.optional stdenv.isDarwin "-D__strong_alias(a,b)="; + propagatedBuildInputs = [ nbPackages.compat ]; + MKDOC = "no"; # missing vfontedpr + postPatch = '' + substituteInPlace printw.c \ + --replace "funopen2(win, NULL, winwrite, NULL, NULL, NULL)" NULL \ + --replace "__strong_alias(vwprintw, vw_printw)" 'extern int vwprintw(WINDOW*, const char*, va_list) __attribute__ ((alias ("vw_printw")));' + substituteInPlace scanw.c \ + --replace "__strong_alias(vwscanw, vw_scanw)" 'extern int vwscanw(WINDOW*, const char*, va_list) __attribute__ ((alias ("vw_scanw")));' + ''; + }; + + libedit = netBSDDerivation { + path = "lib/libedit"; + buildInputs = [ nbPackages.libterminfo libcurses ]; + propagatedBuildInputs = [ nbPackages.compat ]; + makeFlags = [ "INCSDIR=/include" ]; + postPatch = '' + sed -i '1i #undef bool_t' el.h + substituteInPlace config.h \ + --replace "#define HAVE_STRUCT_DIRENT_D_NAMLEN 1" "" + ''; + NIX_CFLAGS_COMPILE = [ + "-D__noinline=" + "-D__scanflike(a,b)=" + "-D__va_list=va_list" + ]; + version = "8.0"; + sha256 = "0pmqh2mkfp70bwchiwyrkdyq9jcihx12g1awd6alqi9bpr3f9xmd"; + }; + + nbPackages = rec { ## ## BOOTSTRAPPING ## makeMinimal = netBSDDerivation rec { path = "tools/make"; - sha256 = "0l4794zwj2haark3azf9xwcwqlkbrifhb2glaa9iba4dkg2mklsb"; - version = "7.1.2"; + sha256 = "1xbzfd4i7allrkk1if74a8ymgpizyj0gkvdigzzj37qar7la7nc1"; + version = "8.0"; buildInputs = []; nativeBuildInputs = []; @@ -162,10 +298,10 @@ let extraPaths = [ make.src ] ++ make.extraPaths; }; - compat = netBSDDerivation rec { + compat = if hostPlatform.isNetBSD then null else netBSDDerivation rec { path = "tools/compat"; - sha256 = "17phkfafybxwhzng44k5bhmag6i55br53ky1nwcmw583kg2fa86z"; - version = "7.1.2"; + sha256 = "050449lq5gpxqsripdqip5ks49g5ypjga188nd3ss8dg1zf7ydz3"; + version = "8.0"; setupHooks = [ ../../../build-support/setup-hooks/role.bash @@ -173,7 +309,7 @@ let ]; # override defaults to prevent infinite recursion - nativeBuildInputs = [ makeMinimal ]; + nativeBuildInputs = [ nbBuildPackages.makeMinimal ]; buildInputs = [ zlib ]; # temporarily use gnuinstall for bootstrapping @@ -206,7 +342,12 @@ let install -D $NETBSDSRCDIR/include/utmpx.h $out/include/utmpx.h install -D $NETBSDSRCDIR/include/tzfile.h $out/include/tzfile.h install -D $NETBSDSRCDIR/sys/sys/tree.h $out/include/sys/tree.h - + install -D $NETBSDSRCDIR/include/nl_types.h $out/include/nl_types.h + install -D $NETBSDSRCDIR/include/stringlist.h $out/include/stringlist.h + '' + lib.optionalString stdenv.isDarwin '' + mkdir -p $out/include/ssp + touch $out/include/ssp/ssp.h + '' + '' mkdir -p $out/lib/pkgconfig substitute ${./libbsd-overlay.pc} $out/lib/pkgconfig/libbsd-overlay.pc \ --subst-var-by out $out \ @@ -222,25 +363,25 @@ let find $out -type d -empty -delete ''; extraPaths = [ libc.src libutil.src - (fetchNetBSD "include" "7.1.2" "1vc58xrhrp202biiv1chhlh0jwnjr7k3qq91pm46k6v5j95j0qwp") - (fetchNetBSD "external/bsd/flex" "7.1.2" "0m0m72r3zzc9gi432h3xkqdzspr4n0hj4m8h7j74pwbvpfg9d9qq") - (fetchNetBSD "sys/sys" "7.1.2" "1vwnv5nk7rlgn5w9nkdqj9652hmwmfwqxj3ymcz0zk10abbaib93") + (fetchNetBSD "include" "8.0" "128m77k16i7frvk8kifhmxzk7a37m7z1s0bbmja3ywga6sx6v6sq") + (fetchNetBSD "external/bsd/flex" "8.0" "0yxcjshz9nj827qhmjwwjmzvmmqgaf0d25b42k7lj84vliwrgyr6") + (fetchNetBSD "sys/sys" "8.0" "0b0yjjy0c0cvk5nyffppqwxlwh2s1qr2xzl97a9ldck00dibar94") ] ++ libutil.extraPaths ++ libc.extraPaths; }; # HACK to ensure parent directories exist. This emulates GNU # install’s -D option. No alternative seems to exist in BSD install. install = let binstall = writeText "binstall" '' - #!/usr/bin/env sh + #!${stdenv.shell} for last in $@; do true; done mkdir -p $(dirname $last) xinstall "$@" ''; in netBSDDerivation { path = "usr.bin/xinstall"; - version = "7.1.2"; - sha256 = "0nzhyh714m19h61m45gzc5dszkbafp5iaphbp5mza6w020fzf2y8"; + version = "8.0"; + sha256 = "1f6pbz3qv1qcrchdxif8p5lbmnwl8b9nq615hsd3cyl4avd5bfqj"; extraPaths = [ mtree.src make.src ]; - nativeBuildInputs = [ makeMinimal mandoc groff ]; + nativeBuildInputs = [ nbBuildPackages.makeMinimal mandoc groff ]; buildInputs = [ compat fts ]; installPhase = '' runHook preInstall @@ -258,13 +399,13 @@ let pname = "fts"; path = "include/fts.h"; sha256 = "01d4fpxvz1pgzfk5xznz5dcm0x0gdzwcsfm1h3d0xc9kc6hj2q77"; - version = "7.1.2"; + version = "8.0"; nativeBuildInputs = [ ]; propagatedBuildInputs = [ compat ]; extraPaths = [ - (fetchNetBSD "lib/libc/gen/fts.c" "7.1.2" "1yfd2liypj6xky2h0mgxi5lgpflmkkg4zf3ii3apz5cf8jq9gmn9") - (fetchNetBSD "lib/libc/include/namespace.h" "7.1.2" "0kwd4v8y0mfjhmwplsk52pvzbcpvpp2qy2g8c0jmfraam63q6q1y") - (fetchNetBSD "lib/libc/gen/fts.3" "7.1.2" "1asxw0n3fhjdadwkkq3xplfgqgl3q32w1lyrvbakfa3gs0wz5zc1") + (fetchNetBSD "lib/libc/gen/fts.c" "8.0" "1a8hmf26242nmv05ipn3ircxb0jqmmi66rh78kkyi9vjwkfl3qn7") + (fetchNetBSD "lib/libc/include/namespace.h" "8.0" "1sjvh9nw3prnk4rmdwrfsxh6gdb9lmilkn46jcfh3q5c8glqzrd7") + (fetchNetBSD "lib/libc/gen/fts.3" "8.0" "1asxw0n3fhjdadwkkq3xplfgqgl3q32w1lyrvbakfa3gs0wz5zc1") ]; buildPhase = '' cc -c -Iinclude -Ilib/libc/include lib/libc/gen/fts.c \ @@ -289,322 +430,124 @@ let stat = netBSDDerivation { path = "usr.bin/stat"; - version = "7.1.2"; + version = "8.0"; sha256 = "0z4r96id2r4cfy443rw2s1n52n186xm0lqvs8s3qjf4314z7r7yh"; - nativeBuildInputs = [ makeMinimal mandoc groff install ]; + nativeBuildInputs = [ nbBuildPackages.makeMinimal nbBuildPackages.install + mandoc groff ]; }; tsort = netBSDDerivation { path = "usr.bin/tsort"; - version = "7.1.2"; + version = "8.0"; sha256 = "1dqvf9gin29nnq3c4byxc7lfd062pg7m84843zdy6n0z63hnnwiq"; - nativeBuildInputs = [ makeMinimal mandoc groff install ]; + nativeBuildInputs = [ nbBuildPackages.makeMinimal nbBuildPackages.install + mandoc groff ]; }; lorder = netBSDDerivation { path = "usr.bin/lorder"; - version = "7.1.2"; + version = "8.0"; sha256 = "0rjf9blihhm0n699vr2bg88m4yjhkbxh6fxliaay3wxkgnydjwn2"; - nativeBuildInputs = [ makeMinimal mandoc groff install ]; + nativeBuildInputs = [ nbBuildPackages.makeMinimal nbBuildPackages.install + mandoc groff ]; }; ## ## END BOOTSTRAPPING ## - libutil = netBSDDerivation { - path = "lib/libutil"; - version = "7.1.2"; - sha256 = "12848ynizz13mvn2kndrkq482xhkw323b7c8fg0zli1nhfsmwsm8"; - extraPaths = [ - (fetchNetBSD "common/lib/libutil" "7.1.2" "0q3ixrf36lip1dx0gafs0a03qfs5cs7n0myqq7af4jpjd6kh1831") - ]; - }; - - libc = netBSDDerivation { - path = "lib/libc"; - version = "7.1.2"; - sha256 = "13rcx3mbx2644z01zgk9gggdfr0hqdbsvd7zrsm2l13yf9aix6pg"; - extraPaths = [ - (fetchNetBSD "common/lib/libc" "7.1.2" "1va8zd4lqyrc1d0c9q04r8y88cfxpkhwcxasggxxvhksd3khkpha") - ]; - }; - - make = netBSDDerivation { - path = "usr.bin/make"; - sha256 = "0srkkg6qdzqlccfi4xh19gl766ks6hpss76bnfvwmd0zg4q4zdar"; - version = "7.1.2"; - postPatch = '' - # make needs this to pick up our sys make files - export NIX_CFLAGS_COMPILE+=" -D_PATH_DEFSYSPATH=\"$out/share/mk\"" - - substituteInPlace $NETBSDSRCDIR/share/mk/bsd.prog.mk \ - --replace '-Wl,-dynamic-linker=''${_SHLINKER}' "" \ - --replace '-Wl,-rpath,''${SHLIBDIR}' "" - substituteInPlace $NETBSDSRCDIR/share/mk/bsd.lib.mk \ - --replace '_INSTRANLIB=''${empty(PRESERVE):?-a "''${RANLIB} -t":}' '_INSTRANLIB=' - '' + lib.optionalString stdenv.isDarwin '' - substituteInPlace $NETBSDSRCDIR/share/mk/bsd.sys.mk \ - --replace '-Wl,--fatal-warnings' "" \ - --replace '-Wl,--warn-shared-textrel' "" - substituteInPlace $NETBSDSRCDIR/share/mk/bsd.lib.mk \ - --replace '-Wl,-soname,''${_LIB}.so.''${SHLIB_SOVERSION}' "" \ - --replace '-Wl,--whole-archive' "" \ - --replace '-Wl,--no-whole-archive' "" \ - --replace '-Wl,--warn-shared-textrel' "" \ - --replace '-Wl,-Map=''${_LIB}.so.''${SHLIB_SOVERSION}.map' "" \ - --replace '-Wl,-rpath,''${SHLIBDIR}' "" - ''; - postInstall = '' - (cd $NETBSDSRCDIR/share/mk && make FILESDIR=/share/mk install) - ''; - extraPaths = [ - (fetchNetBSD "share/mk" "7.1.2" "0570v0siv0wygn8ygs1yy9pgk9xjw9x1axr5qg4xrddv3lskf9xa") - ]; - }; - mtree = netBSDDerivation { path = "usr.sbin/mtree"; - version = "7.1.2"; - sha256 = "1dhsyfvcm67kf5zdbg5dmx5y8fimnbll6qxwp3gjfmbxqigmc52m"; + version = "8.0"; + sha256 = "0hanmzm8bgwz2bhsinmsgfmgy6nbdhprwmgwbyjm6bl17vgn7vid"; + extraPaths = [ mknod.src ]; }; - who = netBSDDerivation { - path = "usr.bin/who"; - version = "7.1.2"; - sha256 = "17ffwww957m3qw0b6fkgjpp12pd5ydg2hs9dxkkw0qpv11j00d88"; - postPatch = lib.optionalString stdenv.isLinux '' - substituteInPlace $NETBSDSRCDIR/usr.bin/who/utmpentry.c \ - --replace "utmptime = st.st_mtimespec" "utmptime = st.st_mtim" \ - --replace "timespeccmp(&st.st_mtimespec, &utmptime, >)" "st.st_mtim.tv_sec == utmptime.tv_sec ? st.st_mtim.tv_nsec > utmptime.tv_nsec : st.st_mtim.tv_sec > utmptime.tv_sec" - '' + lib.optionalString stdenv.isDarwin '' - substituteInPlace $NETBSDSRCDIR/usr.bin/who/utmpentry.c \ - --replace "timespeccmp(&st.st_mtimespec, &utmpxtime, >)" "st.st_mtimespec.tv_sec == utmpxtime.tv_sec ? st.st_mtimespec.tv_nsec > utmpxtime.tv_nsec : st.st_mtimespec.tv_sec > utmpxtime.tv_sec" - '' + '' - substituteInPlace $NETBSDSRCDIR/usr.bin/who/utmpentry.c \ - --replace "strncpy(e->name, up->ut_name, sizeof(up->ut_name))" "strncpy(e->name, up->ut_user, sizeof(up->ut_user))" \ - --replace "timespecclear(&utmptime)" "utmptime.tv_sec = utmptime.tv_nsec = 0" \ - --replace "timespecclear(&utmpxtime)" "utmpxtime.tv_sec = utmpxtime.tv_nsec = 0" - ''; + mknod = netBSDDerivation { + path = "sbin/mknod"; + version = "8.0"; + sha256 = "0vq66v0hj0r4z2r2z2d3l3c5vh48pvcdmddc8bhm8hzq2civ5df2"; }; -in rec { - inherit compat install netBSDDerivation fts; - getent = netBSDDerivation { path = "usr.bin/getent"; sha256 = "1ylhw4dnpyrmcy8n5kjcxywm8qc9p124dqnm17x4magiqx1kh9iz"; - version = "7.1.2"; + version = "8.0"; patches = [ ./getent.patch ]; }; getconf = netBSDDerivation { path = "usr.bin/getconf"; sha256 = "122vslz4j3h2mfs921nr2s6m078zcj697yrb75rwp2hnw3qz4s8q"; - version = "7.1.2"; + version = "8.0"; }; dict = netBSDDerivation { path = "share/dict"; - version = "7.1.2"; - sha256 = "0nickhsjwgnr2h9nvwflvgfz93kqms5hzdnpyq02crpj35w98bh4"; + version = "8.0"; + sha256 = "1pk0y3xc5ihc2k89wjkh33qqx3w9q34k03k2qcffvbqh1l6wm36l"; makeFlags = [ "BINDIR=/share" ]; }; - games = netBSDDerivation { - path = "games"; - sha256 = "04wjsang8f8kxsifiayklbxaaxmm3vx9rfr91hfbxj4hk8gkqzy1"; - version = "7.1.2"; - makeFlags = [ "BINDIR=/bin" - "SCRIPTSDIR=/bin" ]; - postPatch = '' - sed -i '1i #include <time.h>' adventure/save.c - - for f in $(find . -name pathnames.h); do - substituteInPlace $f \ - --replace /usr/share/games $out/share/games \ - --replace /usr/games $out/bin \ - --replace /usr/libexec $out/libexec \ - --replace /usr/bin/more ${less}/bin/less \ - --replace /usr/share/dict ${dict}/share/dict - done - substituteInPlace boggle/boggle/bog.h \ - --replace /usr/share/games $out/share/games - substituteInPlace ching/ching/ching.sh \ - --replace /usr/share $out/share \ - --replace /usr/libexec $out/libexec - substituteInPlace hunt/huntd/driver.c \ - --replace "(void) setpgrp(getpid(), getpid());" "" - - # Disable some games that don't build. They should be possible - # to build but need to look at how to implement stuff in - # Linux. macOS is missing gettime. TODO try to get these - # working. - disableGame() { - substituteInPlace Makefile --replace $1 "" - } - - disableGame atc - disableGame dm - disableGame dab - disableGame sail - disableGame trek - ${lib.optionalString stdenv.isLinux "disableGame boggle"} - ${lib.optionalString stdenv.isLinux "disableGame hunt"} - ${lib.optionalString stdenv.isLinux "disableGame larn"} - ${lib.optionalString stdenv.isLinux "disableGame phantasia"} - ${lib.optionalString stdenv.isLinux "disableGame rogue"} - ${lib.optionalString stdenv.isDarwin "disableGame adventure"} - ${lib.optionalString stdenv.isDarwin "disableGame factor"} - ${lib.optionalString stdenv.isDarwin "disableGame gomoku"} - ${lib.optionalString stdenv.isDarwin "disableGame mille"} - ''; - - # HACK strfile needs to be installed first & in the path. The - # Makefile should do this for us but haven't gotten it to work - preBuild = '' - (cd fortune/strfile && make && make BINDIR=/bin install) - export PATH=$out/bin:$PATH - ''; - - postInstall = '' - substituteInPlace $out/usr/share/games/quiz.db/index \ - --replace /usr $out - ''; - - NIX_CFLAGS_COMPILE = [ - "-D__noinline=" - "-D__scanflike(a,b)=" - "-D__va_list=va_list" - "-DOXTABS=XTABS" - "-DRANDOM_MAX=RAND_MAX" - "-DINFTIM=-1" - (lib.optionalString stdenv.hostPlatform.isMusl "-include sys/ttydefaults.h -include sys/file.h") - "-DBE32TOH(x)=((void)0)" - "-DBE64TOH(x)=((void)0)" - "-D__c99inline=__inline" - ]; - - buildInputs = [ compat libcurses libterminfo libressl ]; - extraPaths = [ dict.src who.src ]; - }; - - finger = netBSDDerivation { - path = "usr.bin/finger"; - sha256 = "0jl672z50f2yf7ikp682b3xrarm6bnrrx9vi94xnp2fav8m8zfyi"; - version = "7.1.2"; - NIX_CFLAGS_COMPILE = [ - (if stdenv.isLinux then "-DSUPPORT_UTMP" else "-USUPPORT_UTMP") - (if stdenv.isDarwin then "-DSUPPORT_UTMPX" else "-USUPPORT_UTMPX") - ]; - postPatch = '' - NIX_CFLAGS_COMPILE+=" -I$NETBSDSRCDIR/include" - - substituteInPlace extern.h \ - --replace psort _psort - - ${who.postPatch} - ''; - extraPaths = [ who.src ] - ++ lib.optional stdenv.isDarwin (fetchNetBSD "include/utmp.h" "7.1.2" "05690fzz0825p2bq0sfyb00mxwd0wa06qryqgqkwpqk9y2xzc7px"); - }; - fingerd = netBSDDerivation { path = "libexec/fingerd"; - sha256 = "1hhdq70hrxxkjnjfmjm3w8w9g9xq2ngxaxk0chy4vm7chg9nfpmp"; - version = "7.1.2"; - }; - - libedit = netBSDDerivation { - path = "lib/libedit"; - buildInputs = [ libterminfo libcurses ]; - propagatedBuildInputs = [ compat ]; - makeFlags = [ "INCSDIR=/include" ]; - postPatch = '' - sed -i '1i #undef bool_t' el.h - substituteInPlace config.h \ - --replace "#define HAVE_STRUCT_DIRENT_D_NAMLEN 1" "" - ''; - NIX_CFLAGS_COMPILE = [ - "-D__noinline=" - "-D__scanflike(a,b)=" - "-D__va_list=va_list" - ]; - version = "7.1.2"; - sha256 = "0qvr52j4qih10m7fa8nddn1psyjy9l0pa4ix02acyssjvgbz2kca"; + sha256 = "0blcahhgyj1lm0mimrbvgmq3wkjvqk5wy85sdvbs99zxg7da1190"; + version = "8.0"; }; libterminfo = netBSDDerivation { path = "lib/libterminfo"; - version = "7.1.2"; - sha256 = "06plg0bjqgbb0aghpb9qlk8wkp1l2izdlr64vbr5laqyw8jg84zq"; + version = "8.0"; + sha256 = "14gp0d6fh6zjnbac2yjhyq5m6rca7gm6q1s9gilhzpdgl9m7vb9r"; buildInputs = [ compat tic nbperf ]; - MKPIC = if stdenv.isDarwin then "no" else "yes"; makeFlags = [ "INCSDIR=/include" ]; postPatch = '' substituteInPlace term.c --replace /usr/share $out/share + substituteInPlace setupterm.c --replace '#include <curses.h>' 'void use_env(bool);' + ''; postInstall = '' - (cd $NETBSDSRCDIR/share/terminfo && make && make BINDIR=/share install) + make -C $NETBSDSRCDIR/share/terminfo BINDIR=/share + make -C $NETBSDSRCDIR/share/terminfo BINDIR=/share install ''; extraPaths = [ - (fetchNetBSD "share/terminfo" "7.1.2" "1z5vzq8cw24j05r6df4vd6r57cvdbv7vbm4h962kplp14xrbg2h3") + (fetchNetBSD "share/terminfo" "8.0" "18db0fk1dw691vk6lsm6dksm4cf08g8kdm0gc4052ysdagg2m6sm") ]; }; - libcurses = netBSDDerivation { - path = "lib/libcurses"; - version = "7.1.2"; - sha256 = "04djah9dadzw74nswn0xydkxn900kav8xdvxlxdl50nbrynxg9yf"; - buildInputs = [ libterminfo ]; - makeFlags = [ "INCSDIR=/include" ]; - NIX_CFLAGS_COMPILE = [ - "-D__scanflike(a,b)=" - "-D__va_list=va_list" - "-D__warn_references(a,b)=" - ] ++ lib.optional stdenv.isDarwin "-D__strong_alias(a,b)="; - propagatedBuildInputs = [ compat ]; - MKDOC = "no"; # missing vfontedpr - MKPIC = if stdenv.isDarwin then "no" else "yes"; - postPatch = lib.optionalString (!stdenv.isDarwin) '' - substituteInPlace printw.c \ - --replace "funopen(win, NULL, __winwrite, NULL, NULL)" NULL \ - --replace "__strong_alias(vwprintw, vw_printw)" 'extern int vwprintw(WINDOW*, const char*, va_list) __attribute__ ((alias ("vw_printw")));' - substituteInPlace scanw.c \ - --replace "__strong_alias(vwscanw, vw_scanw)" 'extern int vwscanw(WINDOW*, const char*, va_list) __attribute__ ((alias ("vw_scanw")));' - ''; - }; - nbperf = netBSDDerivation { path = "usr.bin/nbperf"; - version = "7.1.2"; + version = "8.0"; sha256 = "0gzm0zv2400lasnsswnjw9bwzyizhxzdbrcjwcl1k65aj86aqyqb"; }; tic = netBSDDerivation { path = "tools/tic"; - version = "7.1.2"; + version = "8.0"; sha256 = "092y7db7k4kh2jq8qc55126r5qqvlb8lq8mhmy5ipbi36hwb4zrz"; HOSTPROG = "tic"; buildInputs = [ compat nbperf ]; extraPaths = [ libterminfo.src - (fetchNetBSD "usr.bin/tic" "7.1.2" "1ghwsaag4gbwvgp3lfxscnh8hn27n8cscwmgjwp3bkx5vl85nfsa") - (fetchNetBSD "tools/Makefile.host" "7.1.2" "076r3amivb6xranpvqjmg7x5ibj4cbxaa3z2w1fh47h7d55dw9w8") + (fetchNetBSD "usr.bin/tic" "8.0" "0diirnzmdnpc5bixyb34c9rid9paw2a4zfczqrpqrfvjsf1nnljf") + (fetchNetBSD "tools/Makefile.host" "8.0" "1p23dsc4qrv93vc6gzid9w2479jwswry9qfn88505s0pdd7h6nvp") ]; }; misc = netBSDDerivation { path = "share/misc"; - version = "7.1.2"; - sha256 = "1vyn30js14nnadlls55mg7g1gz8h14l75rbrrh8lgn49qg289665"; + version = "8.0"; + sha256 = "0d34b3irjbqsqfk8v8aaj36fjyvwyx410igl26jcx2ryh3ispch8"; makeFlags = [ "BINDIR=/share" ]; }; locale = netBSDDerivation { path = "usr.bin/locale"; - version = "7.1.2"; + version = "8.0"; sha256 = "0kk6v9k2bygq0wf9gbinliqzqpzs9bgxn0ndyl2wcv3hh2bmsr9p"; patches = [ ./locale.patch ]; + NIX_CFLAGS_COMPILE = "-DYESSTR=__YESSTR -DNOSTR=__NOSTR"; + }; + }; -} +in nbPackages diff --git a/pkgs/os-specific/darwin/apple-source-releases/CF/add-cfmachport.patch b/pkgs/os-specific/darwin/apple-source-releases/CF/add-cfmachport.patch deleted file mode 100644 index a1018d389c14..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/CF/add-cfmachport.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- CF-855.17/CoreFoundation.h 2015-01-03 00:17:41.000000000 -0500 -+++ CF-855.17/CoreFoundation.h.new 2015-01-03 00:18:35.000000000 -0500 -@@ -72,6 +72,7 @@ - #include <CoreFoundation/CFDictionary.h> - #include <CoreFoundation/CFError.h> - #include <CoreFoundation/CFLocale.h> -+#include <CoreFoundation/CFMachPort.h> - #include <CoreFoundation/CFNumber.h> - #include <CoreFoundation/CFNumberFormatter.h> - #include <CoreFoundation/CFPreferences.h> - ---- CF-855.17/Makefile 2015-01-03 00:32:52.000000000 -0500 -+++ CF-855.17/Makefile.new 2015-01-03 00:33:07.000000000 -0500 -@@ -9,7 +9,7 @@ - HFILES = $(wildcard *.h) - INTERMEDIATE_HFILES = $(addprefix $(OBJBASE)/CoreFoundation/,$(HFILES)) - --PUBLIC_HEADERS=CFArray.h CFBag.h CFBase.h CFBinaryHeap.h CFBitVector.h CFBundle.h CFByteOrder.h CFCalendar.h CFCharacterSet.h CFData.h CFDate.h CFDateFormatter.h CFDictionary.h CFError.h CFLocale.h CFMessagePort.h CFNumber.h CFNumberFormatter.h CFPlugIn.h CFPlugInCOM.h CFPreferences.h CFPropertyList.h CFRunLoop.h CFSet.h CFSocket.h CFStream.h CFString.h CFStringEncodingExt.h CFTimeZone.h CFTree.h CFURL.h CFURLAccess.h CFUUID.h CFUserNotification.h CFXMLNode.h CFXMLParser.h CFAvailability.h CFUtilities.h CoreFoundation.h -+PUBLIC_HEADERS=CFArray.h CFBag.h CFBase.h CFBinaryHeap.h CFBitVector.h CFBundle.h CFByteOrder.h CFCalendar.h CFCharacterSet.h CFData.h CFDate.h CFDateFormatter.h CFDictionary.h CFError.h CFLocale.h CFMachPort.h CFMessagePort.h CFNumber.h CFNumberFormatter.h CFPlugIn.h CFPlugInCOM.h CFPreferences.h CFPropertyList.h CFRunLoop.h CFSet.h CFSocket.h CFStream.h CFString.h CFStringEncodingExt.h CFTimeZone.h CFTree.h CFURL.h CFURLAccess.h CFUUID.h CFUserNotification.h CFXMLNode.h CFXMLParser.h CFAvailability.h CFUtilities.h CoreFoundation.h - - PRIVATE_HEADERS=CFBundlePriv.h CFCharacterSetPriv.h CFError_Private.h CFLogUtilities.h CFPriv.h CFRuntime.h CFStorage.h CFStreamAbstract.h CFStreamPriv.h CFStreamInternal.h CFStringDefaultEncoding.h CFStringEncodingConverter.h CFStringEncodingConverterExt.h CFUniChar.h CFUnicodeDecomposition.h CFUnicodePrecomposition.h ForFoundationOnly.h CFBurstTrie.h CFICULogging.h - diff --git a/pkgs/os-specific/darwin/apple-source-releases/CF/cf-bridging.patch b/pkgs/os-specific/darwin/apple-source-releases/CF/cf-bridging.patch deleted file mode 100644 index 068a6311a9cb..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/CF/cf-bridging.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/CFBase.h b/CFBase.h -index ffddd2b..e5a926b 100644 ---- a/CFBase.h -+++ b/CFBase.h -@@ -249,6 +249,33 @@ CF_EXTERN_C_BEGIN - #endif - #endif - -+#if __has_attribute(objc_bridge) && __has_feature(objc_bridge_id) && __has_feature(objc_bridge_id_on_typedefs) -+ -+#ifdef __OBJC__ -+@class NSArray; -+@class NSAttributedString; -+@class NSString; -+@class NSNull; -+@class NSCharacterSet; -+@class NSData; -+@class NSDate; -+@class NSTimeZone; -+@class NSDictionary; -+@class NSError; -+@class NSLocale; -+@class NSNumber; -+@class NSSet; -+@class NSURL; -+#endif -+ -+#define CF_BRIDGED_TYPE(T) __attribute__((objc_bridge(T))) -+#define CF_BRIDGED_MUTABLE_TYPE(T) __attribute__((objc_bridge_mutable(T))) -+#define CF_RELATED_TYPE(T,C,I) __attribute__((objc_bridge_related(T,C,I))) -+#else -+#define CF_BRIDGED_TYPE(T) -+#define CF_BRIDGED_MUTABLE_TYPE(T) -+#define CF_RELATED_TYPE(T,C,I) -+#endif - - CF_EXPORT double kCFCoreFoundationVersionNumber; - - diff --git a/pkgs/os-specific/darwin/apple-source-releases/CF/default.nix b/pkgs/os-specific/darwin/apple-source-releases/CF/default.nix deleted file mode 100644 index 5589d1592f46..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/CF/default.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ stdenv, appleDerivation, ICU, dyld, libdispatch, libplatform, launchd, libclosure }: - -# this project uses blocks, a clang-only extension -assert stdenv.cc.isClang; - -appleDerivation { - buildInputs = [ dyld ICU libdispatch libplatform launchd libclosure ]; - - patches = [ ./add-cfmachport.patch ./cf-bridging.patch ./remove-xpc.patch ]; - - __propagatedImpureHostDeps = [ "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation" ]; - - preBuild = '' - substituteInPlace Makefile \ - --replace "/usr/bin/clang" "clang" \ - --replace "-arch i386 " "" \ - --replace "/usr/bin/" "" \ - --replace "/usr/sbin/" "" \ - --replace "/bin/" "" \ - --replace "INSTALLNAME=/System" "INSTALLNAME=$out" \ - --replace "install_name_tool -id /System/Library/Frameworks" "install_name_tool -id @rpath" \ - --replace 'chown -RH -f root:wheel $(DSTBASE)/CoreFoundation.framework' "" \ - --replace 'chmod -RH' 'chmod -R' - - # with this file present, CoreFoundation gets a _main symbol defined, which can - # interfere with linking other programs - rm plconvert.c - - replacement=''$'#define __PTK_FRAMEWORK_COREFOUNDATION_KEY5 55\n#define _pthread_getspecific_direct(key) pthread_getspecific((key))\n#define _pthread_setspecific_direct(key, val) pthread_setspecific((key), (val))' - - substituteInPlace CFPlatform.c --replace "#include <pthread/tsd_private.h>" "$replacement" - - substituteInPlace CFRunLoop.c --replace "#include <pthread/private.h>" "" - - substituteInPlace CFURLPriv.h \ - --replace "#include <CoreFoundation/CFFileSecurity.h>" "" \ - --replace "#include <CoreFoundation/CFURLEnumerator.h>" "" \ - --replace "CFFileSecurityRef" "void *" \ - --replace "CFURLEnumeratorResult" "void *" \ - --replace "CFURLEnumeratorRef" "void *" - - export DSTROOT=$out - ''; - - postInstall = '' - mv $out/System/* $out - rmdir $out/System - mv $out/Library/Frameworks/CoreFoundation.framework/Versions/A/PrivateHeaders/* \ - $out/Library/Frameworks/CoreFoundation.framework/Versions/A/Headers - ''; -} diff --git a/pkgs/os-specific/darwin/apple-source-releases/CF/remove-xpc.patch b/pkgs/os-specific/darwin/apple-source-releases/CF/remove-xpc.patch deleted file mode 100644 index a7b9fe486434..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/CF/remove-xpc.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/CFBundlePriv.h b/CFBundlePriv.h -index d4feb5f..e7b52e8 100644 ---- a/CFBundlePriv.h -+++ b/CFBundlePriv.h -@@ -254,12 +254,6 @@ Boolean _CFBundleGetStringsFilesShared(CFBundleRef bundle); - CF_EXPORT - CFURLRef _CFBundleCopyFrameworkURLForExecutablePath(CFStringRef executablePath); - --#if (TARGET_OS_MAC && !(TARGET_OS_EMBEDDED || TARGET_OS_IPHONE)) || (TARGET_OS_EMBEDDED || TARGET_OS_IPHONE) --#include <xpc/xpc.h> --CF_EXPORT --void _CFBundleSetupXPCBootstrap(xpc_object_t bootstrap) CF_AVAILABLE(10_10, 8_0); --#endif -- - /* Functions deprecated as SPI */ - - CF_EXPORT diff --git a/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix b/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix index 89ff68266a29..761ff3ea9252 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix @@ -1,8 +1,6 @@ -{ cctools, appleDerivation }: +{ appleDerivation }: appleDerivation { - nativeBuildInputs = [ cctools ]; - patches = [ ./clang-5.patch ]; postPatch = '' diff --git a/pkgs/os-specific/darwin/apple-source-releases/default.nix b/pkgs/os-specific/darwin/apple-source-releases/default.nix index e2d62cef1ba4..4fa0c0e3e47f 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/default.nix @@ -204,7 +204,6 @@ let bootstrap_cmds = applePackage "bootstrap_cmds" "dev-tools-7.0" "1v5dv2q3af1xwj5kz0a5g54fd5dm6j4c9dd2g66n4kc44ixyrhp3" {}; bsdmake = applePackage "bsdmake" "dev-tools-3.2.6" "11a9kkhz5bfgi1i8kpdkis78lhc6b5vxmhd598fcdgra1jw4iac2" {}; CarbonHeaders = applePackage "CarbonHeaders" "osx-10.6.2" "1zam29847cxr6y9rnl76zqmkbac53nx0szmqm9w5p469a6wzjqar" {}; - CF = applePackage "CF" "osx-10.10.5" "07f5psjxi7wyd13ci4x83ya5hy6p69sjfqcpp2mmxdlhd8yzkf74" {}; CommonCrypto = applePackage "CommonCrypto" "osx-10.11.6" "0vllfpb8f4f97wj2vpdd7w5k9ibnsbr6ff1zslpp6q323h01n25y" {}; configd = applePackage "configd" "osx-10.8.5" "1gxakahk8gallf16xmhxhprdxkh3prrmzxnmxfvj0slr0939mmr2" {}; copyfile = applePackage "copyfile" "osx-10.11.6" "1rkf3iaxmjz5ycgrmf0g971kh90jb2z1zqxg5vlqz001s4y457gs" {}; @@ -216,7 +215,7 @@ let # Splicing is currently broken in Nixpkgs # cctools need to be specified manually here to handle this - ICU = applePackage "ICU" "osx-10.10.5" "1qihlp42n5g4dl0sn0f9pc0bkxy1452dxzf0vr6y5gqpshlzy03p" { inherit (buildPackages.darwin) cctools; }; + ICU = applePackage "ICU" "osx-10.10.5" "1qihlp42n5g4dl0sn0f9pc0bkxy1452dxzf0vr6y5gqpshlzy03p" {}; IOKit = applePackage "IOKit" "osx-10.11.6" "0kcbrlyxcyirvg5p95hjd9k8a01k161zg0bsfgfhkb90kh2s8x00" { inherit IOKitSrcs; }; launchd = applePackage "launchd" "osx-10.9.5" "0w30hvwqq8j5n90s3qyp0fccxflvrmmjnicjri4i1vd2g196jdgj" {}; diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_generic/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_generic/default.nix index fe68ee78d1f0..714524e8da58 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_generic/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_generic/default.nix @@ -33,7 +33,6 @@ name: version: sha256: args: let pkgs.gnustep.make pkgs.darwin.apple_sdk.frameworks.AppKit pkgs.darwin.apple_sdk.frameworks.Foundation - pkgs.darwin.cf-private ]; makeFlags = [ "-f${makeFile}" diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_keychain/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_keychain/default.nix index 609d07fda100..724c4788b6cc 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_keychain/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_keychain/default.nix @@ -39,9 +39,5 @@ appleDerivation { --replace 'return mLoginDLDbIdentifier;' 'return mLoginDLDbIdentifier; }' \ --replace '_xpc_runtime_is_app_sandboxed()' 'false' # hope that doesn't hurt anything - - substituteInPlace lib/KCEventNotifier.h --replace \ - 'CoreFoundation/CFNotificationCenter.h' \ - '${apple_sdk.sdk.out}/Library/Frameworks/CoreFoundation.framework/Versions/A/Headers/CFNotificationCenter.h' ''; } diff --git a/pkgs/os-specific/darwin/cctools/port.nix b/pkgs/os-specific/darwin/cctools/port.nix index fff6eaaa5c1d..bad17cf6de46 100644 --- a/pkgs/os-specific/darwin/cctools/port.nix +++ b/pkgs/os-specific/darwin/cctools/port.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, autoconf, automake, libtool_2, autoreconfHook -, libcxxabi, libuuid +, libcxxabi, libuuid, llvm , libobjc ? null, maloader ? null , enableDumpNormalizedLibArgs ? false }: @@ -56,7 +56,7 @@ let autoreconfHook ]; buildInputs = [ libuuid ] ++ - stdenv.lib.optionals stdenv.isDarwin [ libcxxabi libobjc ]; + stdenv.lib.optionals stdenv.isDarwin [ llvm libcxxabi libobjc ]; patches = [ ./ld-rpath-nonfinal.patch ./ld-ignore-rpath-link.patch diff --git a/pkgs/os-specific/darwin/cf-private/default.nix b/pkgs/os-specific/darwin/cf-private/default.nix index 603c0f652b01..3fac20d23c78 100644 --- a/pkgs/os-specific/darwin/cf-private/default.nix +++ b/pkgs/os-specific/darwin/cf-private/default.nix @@ -1,21 +1,59 @@ -{ stdenv, osx_private_sdk, CF }: +{ CF, apple_sdk }: -stdenv.mkDerivation { - name = "${CF.name}-private"; - phases = [ "installPhase" "fixupPhase" ]; - installPhase = '' - dest=$out/Library/Frameworks/CoreFoundation.framework/Headers - mkdir -p $dest - pushd $dest - for file in ${CF}/Library/Frameworks/CoreFoundation.framework/Headers/*; do - ln -sf $file - done - - # Copy or overwrite private headers, some of these might already - # exist in CF but the private versions have more information. - cp -Lfv ${osx_private_sdk}/include/CoreFoundationPrivateHeaders/* $dest - popd - ''; +# cf-private is a bit weird, but boils down to CF with a weird setup-hook that +# makes a build link against the system CoreFoundation rather than our pure one. +# The reason it exists is that although our CF headers and build are pretty legit +# now, the underlying runtime is quite different. Apple's in a bit of flux around CF +# right now, and support three different backends for it: swift, "C", and an ObjC +# one. The former two can be built from public sources, but the ObjC one isn't really +# public. Unfortunately, it's also one of the core underpinnings of a lot of Mac- +# specific behavior, and defines a lot of symbols that some Objective C apps depend +# on, even though one might expect those symbols to derive from Foundation. So if +# your app relies on NSArray and several other basic ObjC types, it turns out that +# because of their magic "toll-free bridging" support, the symbols for those types +# live in CoreFoundation with an ObjC runtime. And because that isn't public, we have +# this hack in place to let people link properly anyway. Phew! +# +# This can be revisited if Apple ever decide to release the ObjC backend in a publicly +# buildable form. +# +# This doesn't really need to rebuild CF, but it's cheap, and adding a setup hook to +# an existing package was annoying. We need a buildEnv that knows how to add those +CF.overrideAttrs (orig: { + # PLEASE if you add things to this derivation, explain in reasonable detail why + # you're adding them and when the workaround can go away. This whole derivation is + # a workaround and if you don't explain what you're working around, it makes it + # very hard for people to clean it up later. + name = "${orig.name}-private"; setupHook = ./setup-hook.sh; -} + + # TODO: consider re-adding https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/darwin/apple-source-releases/CF/cf-bridging.patch + # once the missing headers are in and see if that fixes all need for this. + + # This can go away once https://bugs.swift.org/browse/SR-8741 happens, which is + # looking more likely these days with the friendly people at Apple! We only need + # the header because the setup hook takes care of linking us against a version + # of the framework with the functionality built into it. The main user I know of + # this is watchman, who can almost certainly switch to the pure CF once the header + # and functionality is merged in. + installPhase = orig.installPhase + '' + basepath="Library/Frameworks/CoreFoundation.framework/Headers" + path="$basepath/CFFileDescriptor.h" + + # Append the include at top level or nobody will notice the header we're about to add + sed -i '/CFNotificationCenter.h/a #include <CoreFoundation/CFFileDescriptor.h>' \ + "$out/$basepath/CoreFoundation.h" + + cp ${apple_sdk.frameworks.CoreFoundation}/$path $out/$path + '' + + # This one is less likely to go away, but I'll mention it anyway. The issue is at + # https://bugs.swift.org/browse/SR-8744, and the main user I know of is qtbase + '' + path="$basepath/CFURLEnumerator.h" + sed -i '/CFNotificationCenter.h/a #include <CoreFoundation/CFURLEnumerator.h>' \ + "$out/$basepath/CoreFoundation.h" + + cp ${apple_sdk.frameworks.CoreFoundation}/$path $out/$path + ''; +}) \ No newline at end of file diff --git a/pkgs/os-specific/darwin/reattach-to-user-namespace/default.nix b/pkgs/os-specific/darwin/reattach-to-user-namespace/default.nix index b14008e11f10..631c59523e2a 100644 --- a/pkgs/os-specific/darwin/reattach-to-user-namespace/default.nix +++ b/pkgs/os-specific/darwin/reattach-to-user-namespace/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "reattach-to-user-namespace-${version}"; - version = "2.6"; + version = "2.7"; src = fetchurl { - url = "https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard/archive/v2.6.tar.gz"; - sha256 = "1d8ynzkdlxyyky9f88f7z50g9lwdydkpb2n7gkw3jgl2ac569xc0"; + url = "https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard/archive/v${version}.tar.gz"; + sha256 = "00mjyj8yicrpnlm46rlbkvxgl5381l8xawh7rmjk10p3zrm56jbv"; }; buildFlags = "ARCHES=x86_64"; diff --git a/pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix b/pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix index 1dea55cccc9e..f819429f4deb 100644 --- a/pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix +++ b/pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix @@ -14,11 +14,12 @@ in stdenv.mkDerivation { src = fetchFromGitHub { owner = "apple"; repo = "swift-corelibs-foundation"; - rev = "85c640e7ce50e6ca61a134c72270e214bc63fdba"; # https://github.com/apple/swift-corelibs-foundation/pull/1686 - sha256 = "0z2v278wy7jh0c92g1dszd8hj8naxari660sqx6yab5dwapd46qc"; + rev = "71aaba20e1450a82c516af1342fe23268e15de0a"; + sha256 = "17kpql0f27xxz4jjw84vpas5f5sn4vdqwv10g151rc3rswbwln1z"; }; - buildInputs = [ ninja python libxml2 objc4 ICU curl ]; + nativeBuildInputs = [ ninja python ]; + buildInputs = [ libxml2 objc4 ICU curl ]; sourceRoot = "source/CoreFoundation"; @@ -31,8 +32,7 @@ in stdenv.mkDerivation { # 3. Use the legit CoreFoundation.h, not the one telling you not to use it because of Swift substituteInPlace build.py \ --replace "cf.CFLAGS += '-DDEPLOYMENT" '#' \ - --replace "cf.LDFLAGS += '-ldispatch" '#' \ - --replace "Base.subproj/SwiftRuntime/CoreFoundation.h" 'Base.subproj/CoreFoundation.h' + --replace "cf.LDFLAGS += '-ldispatch" '#' # Includes xpc for some initialization routine that they don't define anyway, so no harm here substituteInPlace PlugIn.subproj/CFBundlePriv.h \ @@ -53,8 +53,11 @@ in stdenv.mkDerivation { BUILD_DIR = "./Build"; CFLAGS = "-DINCLUDE_OBJC -I${libxml2.dev}/include/libxml2"; # They seem to assume we include objc in some places and not in others, make a PR; also not sure why but libxml2 include path isn't getting picked up from buildInputs - LDFLAGS = "-install_name ${placeholder "out"}/Frameworks/CoreFoundation.framework/CoreFoundation -current_version 1234.56.7 -compatibility_version 150.0.0 -init ___CFInitialize"; - configurePhase = "../configure --sysroot unused"; + + # I'm guessing at the version here. https://github.com/apple/swift-corelibs-foundation/commit/df3ec55fe6c162d590a7653d89ad669c2b9716b1 imported "high sierra" + # and this version is a version from there. No idea how accurate it is. + LDFLAGS = "-current_version 1454.90.0 -compatibility_version 150.0.0 -init ___CFInitialize"; + configurePhase = "../configure release --sysroot UNUSED"; enableParallelBuilding = true; buildPhase = "ninja -j $NIX_BUILD_CORES"; @@ -66,6 +69,12 @@ in stdenv.mkDerivation { mkdir -p $base/Versions/A/{Headers,PrivateHeaders,Modules} cp ./Build/CoreFoundation/libCoreFoundation.dylib $base/Versions/A/CoreFoundation + + # Note that this could easily live in the ldflags above as `-install_name @rpath/...` but + # https://github.com/NixOS/nixpkgs/issues/46434 thwarts that, so for now I'm hacking it up + # after the fact. + install_name_tool -id '@rpath/CoreFoundation.framework/Versions/A/CoreFoundation' $base/Versions/A/CoreFoundation + cp ./Build/CoreFoundation/usr/include/CoreFoundation/*.h $base/Versions/A/Headers cp ./Build/CoreFoundation/usr/include/CoreFoundation/module.modulemap $base/Versions/A/Modules diff --git a/pkgs/os-specific/darwin/swift-corelibs/default.nix b/pkgs/os-specific/darwin/swift-corelibs/default.nix deleted file mode 100644 index 0d96b8fd008e..000000000000 --- a/pkgs/os-specific/darwin/swift-corelibs/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ callPackage, darwin }: - -rec { - corefoundation = callPackage ./corefoundation.nix { inherit (darwin) objc4 ICU; }; - libdispatch = callPackage ./libdispatch.nix { - inherit (darwin) apple_sdk_sierra xnu; - }; -} diff --git a/pkgs/os-specific/linux/batman-adv/alfred.nix b/pkgs/os-specific/linux/batman-adv/alfred.nix index cc632db160f2..605334e12a10 100644 --- a/pkgs/os-specific/linux/batman-adv/alfred.nix +++ b/pkgs/os-specific/linux/batman-adv/alfred.nix @@ -1,14 +1,14 @@ { stdenv, fetchurl, pkgconfig, gpsd, libcap, libnl }: let - ver = "2018.2"; + ver = "2018.3"; in stdenv.mkDerivation rec { name = "alfred-${ver}"; src = fetchurl { url = "https://downloads.open-mesh.org/batman/releases/batman-adv-${ver}/${name}.tar.gz"; - sha256 = "0640p9zy1511pl30i5yybqa0s1yqz83291vw1z22jrcsq57rrgib"; + sha256 = "06lbyac0w48jkxpji9pgkxnwcrwbzs2dwzfgw2vfr1lix6ivhrb2"; }; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/os-specific/linux/cryptodev/default.nix b/pkgs/os-specific/linux/cryptodev/default.nix index 45a7fe177f2b..c146e18f68d5 100644 --- a/pkgs/os-specific/linux/cryptodev/default.nix +++ b/pkgs/os-specific/linux/cryptodev/default.nix @@ -7,7 +7,6 @@ stdenv.mkDerivation rec { src = fetchurl { urls = [ "http://nwl.cc/pub/cryptodev-linux/${pname}.tar.gz" - "http://download.gna.org/cryptodev-linux/${pname}.tar.gz" ]; sha256 = "0l3r8s71vkd0s2h01r7fhqnc3j8cqw4msibrdxvps9hfnd4hnk4z"; }; @@ -20,7 +19,7 @@ stdenv.mkDerivation rec { meta = { description = "Device that allows access to Linux kernel cryptographic drivers"; - homepage = http://home.gna.org/cryptodev-linux/; + homepage = http://cryptodev-linux.org/; license = stdenv.lib.licenses.gpl2Plus; platforms = stdenv.lib.platforms.linux; broken = !stdenv.lib.versionOlder kernel.version "4.13"; diff --git a/pkgs/os-specific/linux/evdi/default.nix b/pkgs/os-specific/linux/evdi/default.nix index 730df56a6429..3c7e2f98b890 100644 --- a/pkgs/os-specific/linux/evdi/default.nix +++ b/pkgs/os-specific/linux/evdi/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "evdi-${version}"; - version = "1.5.0"; + version = "1.5.0.2"; src = fetchFromGitHub { owner = "DisplayLink"; repo = "evdi"; rev = "v${version}"; - sha256 = "01z7bx5rgpb5lc4c6dxfiv52ni25564djxmvmgy3d7r1x1mqhxgs"; + sha256 = "1wjk023lpjxnspfl34c6rzkrixahfdzdkmc3hnmrdw12s3i6ca5x"; }; nativeBuildInputs = kernel.moduleBuildDependencies; @@ -29,6 +29,6 @@ stdenv.mkDerivation rec { platforms = platforms.linux; license = licenses.gpl2; homepage = http://www.displaylink.com/; - broken = versionOlder kernel.version "4.9" || versionAtLeast kernel.version "4.15"; + broken = versionOlder kernel.version "4.9" || versionAtLeast kernel.version "4.15" || stdenv.isAarch64; }; } diff --git a/pkgs/os-specific/linux/firmware/fwupd/default.nix b/pkgs/os-specific/linux/firmware/fwupd/default.nix index e29dd2e6ee53..eabb27f6ae2f 100644 --- a/pkgs/os-specific/linux/firmware/fwupd/default.nix +++ b/pkgs/os-specific/linux/firmware/fwupd/default.nix @@ -7,7 +7,7 @@ }: let # Updating? Keep $out/etc synchronized with passthru.filesInstalledToEtc - version = "1.1.1"; + version = "1.1.2"; python = python3.withPackages (p: with p; [ pygobject3 pycairo pillow ]); installedTestsPython = python3.withPackages (p: with p; [ pygobject3 requests ]); @@ -18,7 +18,7 @@ in stdenv.mkDerivation { name = "fwupd-${version}"; src = fetchurl { url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz"; - sha256 = "0szakfnp6pl8vv3ivb40p5j8pxapfp724a55s2dr1qzzdlbjd08s"; + sha256 = "1qhg8h1dv9k3i0429j0wl37rpxfbahggfd1j8s7a4cw83k42cgfs"; }; outputs = [ "out" "lib" "dev" "devdoc" "man" "installedTests" ]; diff --git a/pkgs/os-specific/linux/firmware/raspberrypi/default.nix b/pkgs/os-specific/linux/firmware/raspberrypi/default.nix index 11a5074cff2c..db1091e349dc 100644 --- a/pkgs/os-specific/linux/firmware/raspberrypi/default.nix +++ b/pkgs/os-specific/linux/firmware/raspberrypi/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "raspberrypi-firmware-${version}"; - version = "1.20180817"; + version = "1.20180919"; src = fetchFromGitHub { owner = "raspberrypi"; repo = "firmware"; rev = version; - sha256 = "0cjlgs7y0x7wjvbz6046017yb9r9wkjrxksvlnc6i9mgdjcryqqm"; + sha256 = "0aw5fzz7kr18cc4phdn81g45swkpaf4022sgi72pq2q6zzqnrdg4"; }; installPhase = '' diff --git a/pkgs/os-specific/linux/firmware/raspberrypi/tools.nix b/pkgs/os-specific/linux/firmware/raspberrypi/tools.nix index 91e6e7f4cc59..4685f6757179 100644 --- a/pkgs/os-specific/linux/firmware/raspberrypi/tools.nix +++ b/pkgs/os-specific/linux/firmware/raspberrypi/tools.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "raspberrypi-tools-${version}"; - version = "2018-02-05"; + version = "2018-10-03"; src = fetchFromGitHub { owner = "raspberrypi"; repo = "userland"; - rev = "a343dcad1dae4e93f4bfb99496697e207f91027e"; - sha256 = "1z4qrwjb7x3a45mx978q8vyhnx068sgzhymm4z0ayhckji4ngal1"; + rev = "de4a7f2e3c391e2d3bc76af31864270e7802d9ac"; + sha256 = "0w96xa98ngdk9m6wv185w8waa7wm2hkn2bhxz52zd477hchzrxlg"; }; patches = [ ./tools-dont-install-sysv-init-scripts.patch ]; diff --git a/pkgs/os-specific/linux/iio-sensor-proxy/default.nix b/pkgs/os-specific/linux/iio-sensor-proxy/default.nix index 0ccc8acfdca9..dcd5b4763ff1 100644 --- a/pkgs/os-specific/linux/iio-sensor-proxy/default.nix +++ b/pkgs/os-specific/linux/iio-sensor-proxy/default.nix @@ -3,19 +3,23 @@ stdenv.mkDerivation rec { name = "iio-sensor-proxy-${version}"; - version = "2.4"; + version = "2.5"; src = fetchFromGitHub { owner = "hadess"; repo = "iio-sensor-proxy"; rev = version; - sha256 = "1c8izq73c00gvv0jc6zby5hcircs4cb16a1d3ivp1i1iflknj46n"; + sha256 = "06x1vvslsa44bgw8s5rr17q9i2ssbw0x04l75zsy3rql9r3y2jzg"; }; configurePhase = '' + runHook preConfigure + ./autogen.sh --prefix=$out \ --with-udevrulesdir=$out/lib/udev/rules.d \ --with-systemdsystemunitdir=$out/lib/systemd/system + + runHook postConfigure ''; buildInputs = [ diff --git a/pkgs/os-specific/linux/iproute/default.nix b/pkgs/os-specific/linux/iproute/default.nix index 13135844aa7a..8f81ec4918ed 100644 --- a/pkgs/os-specific/linux/iproute/default.nix +++ b/pkgs/os-specific/linux/iproute/default.nix @@ -16,6 +16,8 @@ stdenv.mkDerivation rec { substituteInPlace Makefile --replace " netem " " " ''; + outputs = [ "out" "dev"]; + makeFlags = [ "DESTDIR=" "LIBDIR=$(out)/lib" @@ -23,7 +25,7 @@ stdenv.mkDerivation rec { "MANDIR=$(out)/share/man" "BASH_COMPDIR=$(out)/share/bash-completion/completions" "DOCDIR=$(TMPDIR)/share/doc/${name}" # Don't install docs - "HDRDIR=$(TMPDIR)/include/iproute2" # Don't install headers + "HDRDIR=$(dev)/include/iproute2" ]; buildFlags = [ diff --git a/pkgs/os-specific/linux/iwd/default.nix b/pkgs/os-specific/linux/iwd/default.nix index 1e3286f64d68..f30eac588a2f 100644 --- a/pkgs/os-specific/linux/iwd/default.nix +++ b/pkgs/os-specific/linux/iwd/default.nix @@ -3,17 +3,17 @@ let ell = fetchgit { url = https://git.kernel.org/pub/scm/libs/ell/ell.git; - rev = "0.10"; - sha256 = "1yzbx4l3a6hbdmirgbvnrjfiwflyzd38mbxnp23gn9hg3ni3br34"; + rev = "0.11"; + sha256 = "0nifa5w6fxy7cagyas2a0zhcppi83yrcsnnp70ls2rc90x4r1ip8"; }; in stdenv.mkDerivation rec { name = "iwd-${version}"; - version = "0.8"; + version = "0.9"; src = fetchgit { url = https://git.kernel.org/pub/scm/network/wireless/iwd.git; rev = version; - sha256 = "0bx31f77mz3rbl3xja48lb5zgwgialg7hvax889kpkz92wg26mgv"; + sha256 = "1l1jbwsshjbz32s4rf0zfcn3fd16si4y9qa0zaxp00bfzflnpcd4"; }; nativeBuildInputs = [ diff --git a/pkgs/os-specific/linux/kernel-headers/default.nix b/pkgs/os-specific/linux/kernel-headers/default.nix index 09fa4fbfd3a7..23dcbb05f30a 100644 --- a/pkgs/os-specific/linux/kernel-headers/default.nix +++ b/pkgs/os-specific/linux/kernel-headers/default.nix @@ -3,7 +3,7 @@ }: let - common = { version, sha256, patches ? null }: stdenvNoCC.mkDerivation { + common = { version, sha256, patches ? [] }: stdenvNoCC.mkDerivation { name = "linux-headers-${version}"; src = fetchurl { @@ -20,8 +20,6 @@ let extraIncludeDirs = lib.optional stdenvNoCC.hostPlatform.isPowerPC ["ppc"]; - # "patches" array defaults to 'null' to avoid changing hash - # and causing mass rebuild inherit patches; buildPhase = '' @@ -45,7 +43,7 @@ let in { linuxHeaders = common { - version = "4.15"; - sha256 = "0sd7l9n9h7vf9c6gd6ciji28hawda60yj0llh17my06m0s4lf9js"; + version = "4.18.3"; + sha256 = "1m23hjd02bg8mqnd8dc4z4m3kxds1cyrc6j5saiwnhzbz373rvc1"; }; } diff --git a/pkgs/os-specific/linux/kernel/linux-4.14.nix b/pkgs/os-specific/linux/kernel/linux-4.14.nix index 6c1740ea2e43..60b3ffb2d8dc 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.14.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.14.nix @@ -3,7 +3,7 @@ with stdenv.lib; buildLinux (args // rec { - version = "4.14.73"; + version = "4.14.76"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = if (modDirVersionArg == null) then concatStrings (intersperse "." (take 3 (splitString "." "${version}.0"))) else modDirVersionArg; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "07p3w3p8izgk1d0dblvn9ckk4ay10f40pqbwpzvpsi6c3ha3i7lr"; + sha256 = "1gl2wkq4sazvpr0xnn4vrajj3j7w6hfiwdiy34y7jhlazyj1jgzf"; }; } // (args.argsOverride or {})) diff --git a/pkgs/os-specific/linux/kernel/linux-4.18.nix b/pkgs/os-specific/linux/kernel/linux-4.18.nix index 00e8a04f1b9d..9bf33c068b55 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.18.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.18.nix @@ -3,7 +3,7 @@ with stdenv.lib; buildLinux (args // rec { - version = "4.18.11"; + version = "4.18.14"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = if (modDirVersionArg == null) then concatStrings (intersperse "." (take 3 (splitString "." "${version}.0"))) else modDirVersionArg; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "131chbsavavz2hnjyx1xjvsnxdcr0y02p054n9mdvxfalvsiklrn"; + sha256 = "1lv2hpxzlk1yzr5dcjb0q0ylvlwx4ln2jvfvf01b9smr1lvd3iin"; }; } // (args.argsOverride or {})) diff --git a/pkgs/os-specific/linux/kernel/linux-4.4.nix b/pkgs/os-specific/linux/kernel/linux-4.4.nix index bafa975b6184..641e368f74e6 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.4.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.4.nix @@ -1,11 +1,11 @@ { stdenv, buildPackages, fetchurl, perl, buildLinux, ... } @ args: buildLinux (args // rec { - version = "4.4.159"; + version = "4.4.161"; extraMeta.branch = "4.4"; src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "1hivz1pyy4scp4s09ibz36ni4d1pwivizwls5dbh5qjy0pdvn00f"; + sha256 = "11rz66qvbcb6y3fz9k04jzn547sqdahqknd43imsr9sjgkaq60xy"; }; } // (args.argsOverride or {})) diff --git a/pkgs/os-specific/linux/kernel/linux-4.9.nix b/pkgs/os-specific/linux/kernel/linux-4.9.nix index 5c4bee036d86..cdf7000fba89 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.9.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.9.nix @@ -1,11 +1,11 @@ { stdenv, buildPackages, fetchurl, perl, buildLinux, ... } @ args: buildLinux (args // rec { - version = "4.9.130"; + version = "4.9.133"; extraMeta.branch = "4.9"; src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "0zqaidirnr3v9xibp04rr2cjww3nd3phg28cgid0s8q0idm3xnv0"; + sha256 = "0qv5n8vipkqcd0hpf5l41h023n46rgja39h895phlcxs4p00ywsk"; }; } // (args.argsOverride or {})) diff --git a/pkgs/os-specific/linux/kernel/linux-hardkernel-4.14.nix b/pkgs/os-specific/linux/kernel/linux-hardkernel-4.14.nix index 0afb92d705c6..fc9cb2f238b2 100644 --- a/pkgs/os-specific/linux/kernel/linux-hardkernel-4.14.nix +++ b/pkgs/os-specific/linux/kernel/linux-hardkernel-4.14.nix @@ -1,10 +1,10 @@ { stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, libelf, utillinux, ... } @ args: buildLinux (args // rec { - version = "4.14.69-148"; + version = "4.14.73-149"; # modDirVersion needs to be x.y.z. - modDirVersion = "4.14.69"; + modDirVersion = "4.14.73"; # branchVersion needs to be x.y. extraMeta.branch = "4.14"; @@ -13,7 +13,7 @@ buildLinux (args // rec { owner = "hardkernel"; repo = "linux"; rev = version; - sha256 = "1grsmb7lnxnkva03nh8ny4zizvrxjim5kf5ssqkcbfz5mx1fqni0"; + sha256 = "1zc5py6v3xyvy6dwghnqb7nsn9l1aib3d96i5bqy9dd56vyiy5m2"; }; defconfig = "odroidxu4_defconfig"; diff --git a/pkgs/os-specific/linux/kernel/linux-rpi.nix b/pkgs/os-specific/linux/kernel/linux-rpi.nix index d95c2caa2cf0..096b3ecde22a 100644 --- a/pkgs/os-specific/linux/kernel/linux-rpi.nix +++ b/pkgs/os-specific/linux/kernel/linux-rpi.nix @@ -1,8 +1,8 @@ { stdenv, lib, buildPackages, fetchFromGitHub, perl, buildLinux, ... } @ args: let - modDirVersion = "4.14.62"; - tag = "1.20180817"; + modDirVersion = "4.14.70"; + tag = "1.20180919"; in lib.overrideDerivation (buildLinux (args // rec { version = "${modDirVersion}-${tag}"; @@ -12,7 +12,7 @@ lib.overrideDerivation (buildLinux (args // rec { owner = "raspberrypi"; repo = "linux"; rev = "raspberrypi-kernel_${tag}-1"; - sha256 = "17k7c9hcp834qmlpllag8jc6xhym9wkr5lck1vr0y2wlcxccwnaz"; + sha256 = "1zjvzk6rhrn3ngc012gjq3v7lxn8hy89ljb7fqwld5g7py9lkf0b"; }; defconfig = { diff --git a/pkgs/os-specific/linux/kernel/linux-testing.nix b/pkgs/os-specific/linux/kernel/linux-testing.nix index cabaa59966c1..3d28bd68121d 100644 --- a/pkgs/os-specific/linux/kernel/linux-testing.nix +++ b/pkgs/os-specific/linux/kernel/linux-testing.nix @@ -1,13 +1,13 @@ { stdenv, buildPackages, fetchurl, perl, buildLinux, libelf, utillinux, ... } @ args: buildLinux (args // rec { - version = "4.19-rc6"; - modDirVersion = "4.19.0-rc6"; + version = "4.19-rc7"; + modDirVersion = "4.19.0-rc7"; extraMeta.branch = "4.19"; src = fetchurl { url = "https://git.kernel.org/torvalds/t/linux-${version}.tar.gz"; - sha256 = "0cq0xr4lwvngyiyall62hddbk27gy72zjiigb8xdsry96a8ccvgl"; + sha256 = "0wjh62vfhvi2prz9sx9c0s0f9sa9z1775qn4jf8zz5y5isixzdml"; }; # Should the testing kernels ever be built on Hydra? diff --git a/pkgs/os-specific/linux/light/default.nix b/pkgs/os-specific/linux/light/default.nix index d500019c50b4..1856c8861cc4 100644 --- a/pkgs/os-specific/linux/light/default.nix +++ b/pkgs/os-specific/linux/light/default.nix @@ -1,26 +1,31 @@ -{ stdenv, fetchFromGitHub, help2man }: +{ stdenv, fetchFromGitHub, autoreconfHook, coreutils }: stdenv.mkDerivation rec { - version = "1.1.2"; + version = "1.2"; name = "light-${version}"; src = fetchFromGitHub { owner = "haikarainen"; repo = "light"; - rev = version; - sha256 = "0c934gxav9cgdf94li6dp0rfqmpday9d33vdn9xb2mfp4war9n4w"; + rev = "v${version}"; + sha256 = "1h286va0r1xgxlnxfaaarrj3qhxmjjsivfn3khwm0wq1mhkfihra"; }; - buildInputs = [ help2man ]; + configureFlags = [ "--with-udev" ]; - installPhase = "mkdir -p $out/bin; cp light $out/bin/"; + nativeBuildInputs = [ autoreconfHook ]; - preFixup = "make man; mkdir -p $out/man/man1; mv light.1.gz $out/man/man1"; + # ensure udev rules can find the commands used + postPatch = '' + substituteInPlace 90-backlight.rules \ + --replace '/bin/chgrp' '${coreutils}/bin/chgrp' \ + --replace '/bin/chmod' '${coreutils}/bin/chmod' + ''; meta = { description = "GNU/Linux application to control backlights"; homepage = https://haikarainen.github.io/light/; license = stdenv.lib.licenses.gpl3; - maintainers = with stdenv.lib.maintainers; [ puffnfresh ]; + maintainers = with stdenv.lib.maintainers; [ puffnfresh dtzWill ]; platforms = stdenv.lib.platforms.linux; }; } diff --git a/pkgs/os-specific/linux/mcelog/default.nix b/pkgs/os-specific/linux/mcelog/default.nix index 642653259c34..c0e8e1292330 100644 --- a/pkgs/os-specific/linux/mcelog/default.nix +++ b/pkgs/os-specific/linux/mcelog/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "mcelog-${version}"; - version = "160"; + version = "161"; src = fetchFromGitHub { owner = "andikleen"; repo = "mcelog"; rev = "v${version}"; - sha256 = "1m985wvdykl3003967lp1i7707qhwdj3h13cl8g1afjaip9ccd48"; + sha256 = "1bqz53xgvwab3r487ihri3nvk7nsgjykdv8m993983vxsi2bgjmz"; }; postPatch = '' diff --git a/pkgs/os-specific/linux/mwprocapture/default.nix b/pkgs/os-specific/linux/mwprocapture/default.nix index 72095bc8cdab..f6f6c10112a7 100644 --- a/pkgs/os-specific/linux/mwprocapture/default.nix +++ b/pkgs/os-specific/linux/mwprocapture/default.nix @@ -15,17 +15,15 @@ let in stdenv.mkDerivation rec { name = "mwprocapture-1.2.${version}-${kernel.version}"; - version = "3773"; + version = "3950"; src = fetchurl { url = "http://www.magewell.com/files/drivers/ProCaptureForLinux_${version}.tar.gz"; - sha256 = "1ri7c4l4xgkhpz0f15jra1p7mpzi8ir6lpwjm7q7hc9m4cvxcs1g"; + sha256 = "1im3k533r6c0dx08h9wjfbhadzk7zawrxxaz7v94c92m3q133ys6"; }; nativeBuildInputs = [ kernel.moduleBuildDependencies ]; - patches = [ ./linux_4_14_fix.patch ]; - preConfigure = '' cd ./src diff --git a/pkgs/os-specific/linux/mwprocapture/linux_4_14_fix.patch b/pkgs/os-specific/linux/mwprocapture/linux_4_14_fix.patch deleted file mode 100644 index 94da5a00a2e2..000000000000 --- a/pkgs/os-specific/linux/mwprocapture/linux_4_14_fix.patch +++ /dev/null @@ -1,71 +0,0 @@ -diff -Naur ProCaptureForLinux_3773/src/sources/ospi/linux-file.c ProCaptureForLinux_3773_new/src/sources/ospi/linux-file.c ---- ProCaptureForLinux_3773/src/sources/ospi/linux-file.c 2017-12-15 01:59:57.000000000 -0800 -+++ ProCaptureForLinux_3773_new/src/sources/ospi/linux-file.c 2017-12-23 22:47:33.666823299 -0800 -@@ -7,8 +7,9 @@ - - #include "linux-file.h" - --#include <asm/uaccess.h> - #include <linux/sched.h> -+#include <asm/uaccess.h> -+#include <linux/version.h> - - struct file *linux_file_open(const char *path, int flags, int mode) - { -@@ -28,29 +29,36 @@ - filp_close(file, NULL); - } - --ssize_t linux_file_read(struct file *file, loff_t offset, unsigned char *data, size_t size) -+ssize_t linux_file_read(struct file *file, loff_t offset, void *data, size_t size) - { -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) -+ return(kernel_read(file, data, size, &offset)); -+#else - mm_segment_t oldfs; - ssize_t ret; - - oldfs = get_fs(); - set_fs(get_ds()); -- ret = vfs_read(file, data, size, &offset); -+ ret = vfs_read(file, (unsigned char *)data, size, &offset); - set_fs(oldfs); - - return ret; -+#endif - } - --ssize_t linux_file_write(struct file *file, loff_t offset, unsigned char *data, size_t size) -+ssize_t linux_file_write(struct file *file, loff_t offset, const void *data, size_t size) - { -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) -+ return(kernel_write(file, data, size, &offset)); -+#else - mm_segment_t oldfs; - ssize_t ret; - - oldfs = get_fs(); - set_fs(get_ds()); -- ret = vfs_write(file, data, size, &offset); -+ ret = vfs_write(file, (const unsigned char *)data, size, &offset); - set_fs(oldfs); - - return ret; -+#endif - } -- -diff -Naur ProCaptureForLinux_3773/src/sources/ospi/linux-file.h ProCaptureForLinux_3773_new/src/sources/ospi/linux-file.h ---- ProCaptureForLinux_3773/src/sources/ospi/linux-file.h 2017-12-15 01:59:57.000000000 -0800 -+++ ProCaptureForLinux_3773_new/src/sources/ospi/linux-file.h 2017-12-23 22:46:22.028545189 -0800 -@@ -13,9 +13,9 @@ - - void linux_file_close(struct file *file); - --ssize_t linux_file_read(struct file *file, loff_t offset, unsigned char *data, size_t size); -+ssize_t linux_file_read(struct file *file, loff_t offset, void *data, size_t size); - --ssize_t linux_file_write(struct file *file, loff_t offset, unsigned char *data, size_t size); -+ssize_t linux_file_write(struct file *file, loff_t offset, const void *data, size_t size); - - #endif /* __LINUX_FILE_H__ */ - diff --git a/pkgs/os-specific/linux/nfs-utils/default.nix b/pkgs/os-specific/linux/nfs-utils/default.nix index 86e9e0d3d4d0..7235d8415f55 100644 --- a/pkgs/os-specific/linux/nfs-utils/default.nix +++ b/pkgs/os-specific/linux/nfs-utils/default.nix @@ -5,14 +5,9 @@ let statdPath = lib.makeBinPath [ systemd utillinux coreutils ]; +in - # Not nice; feel free to find a nicer solution. - kerberosEnv = buildEnv { - name = "kerberos-env-${kerberos.version}"; - paths = with lib; [ (getDev kerberos) (getLib kerberos) ]; - }; - -in stdenv.mkDerivation rec { +stdenv.mkDerivation rec { name = "nfs-utils-${version}"; version = "2.3.3"; @@ -34,10 +29,19 @@ in stdenv.mkDerivation rec { enableParallelBuilding = true; + preConfigure = + '' + substituteInPlace configure \ + --replace '$dir/include/gssapi' ${lib.getDev kerberos}/include/gssapi \ + --replace '$dir/bin/krb5-config' ${lib.getDev kerberos}/bin/krb5-config + ''; + + #configureScript = "bash -x configure"; + configureFlags = [ "--enable-gss" "--with-statedir=/var/lib/nfs" - "--with-krb5=${kerberosEnv}" + "--with-krb5=${lib.getLib kerberos}" "--with-systemd=${placeholder "out"}/etc/systemd/system" "--enable-libmount-mount" "--with-pluginpath=${placeholder "lib"}/lib/libnfsidmap" # this installs libnfsidmap @@ -97,6 +101,8 @@ in stdenv.mkDerivation rec { # One test fails on mips. doCheck = !stdenv.isMips; + disallowedReferences = [ (lib.getDev kerberos) ]; + meta = with stdenv.lib; { description = "Linux user-space NFS utilities"; diff --git a/pkgs/os-specific/linux/paxctl/default.nix b/pkgs/os-specific/linux/paxctl/default.nix index 52e4c512f9a2..8fdd2356c30d 100644 --- a/pkgs/os-specific/linux/paxctl/default.nix +++ b/pkgs/os-specific/linux/paxctl/default.nix @@ -9,18 +9,12 @@ stdenv.mkDerivation rec { sha256 = "0biw882fp1lmgs6kpxznp1v6758r7dg9x8iv5a06k0b82bcdsc53"; }; - # TODO Always do first way next mass rebuild. - buildInputs = stdenv.lib.optional - (!stdenv.hostPlatform.isLinux || !stdenv.buildPlatform.isLinux) - elf-header; + buildInputs = [ elf-header ]; - # TODO Always do first way next mass rebuild. - preBuild = if !stdenv.hostPlatform.isLinux || !stdenv.buildPlatform.isLinux then '' + preBuild = '' sed -i Makefile \ -e 's|--owner 0 --group 0||g' \ -e '/CC:=gcc/d' - '' else '' - sed "s|--owner 0 --group 0||g" -i Makefile ''; makeFlags = [ diff --git a/pkgs/os-specific/linux/piper/default.nix b/pkgs/os-specific/linux/piper/default.nix index 3e774faaffe2..a3ae0b74f126 100644 --- a/pkgs/os-specific/linux/piper/default.nix +++ b/pkgs/os-specific/linux/piper/default.nix @@ -1,5 +1,6 @@ { stdenv, meson, ninja, pkgconfig, gettext, fetchFromGitHub, python3 -, wrapGAppsHook, gtk3, glib, desktop-file-utils, appstream-glib, gnome3 }: +, wrapGAppsHook, gtk3, glib, desktop-file-utils, appstream-glib, gnome3 +, gobjectIntrospection }: python3.pkgs.buildPythonApplication rec { pname = "piper-${version}"; @@ -14,7 +15,7 @@ python3.pkgs.buildPythonApplication rec { sha256 = "1ny0vf8ym9v040cb5h084k5wwn929fnhq9infbdq8f8vvy61magb"; }; - nativeBuildInputs = [ meson ninja gettext pkgconfig wrapGAppsHook desktop-file-utils appstream-glib ]; + nativeBuildInputs = [ meson ninja gettext pkgconfig wrapGAppsHook desktop-file-utils appstream-glib gobjectIntrospection ]; buildInputs = [ gtk3 glib gnome3.defaultIconTheme python3 ]; propagatedBuildInputs = with python3.pkgs; [ lxml evdev pygobject3 ]; diff --git a/pkgs/os-specific/linux/pscircle/default.nix b/pkgs/os-specific/linux/pscircle/default.nix index a334465fb71d..1efbd7bc2c9f 100644 --- a/pkgs/os-specific/linux/pscircle/default.nix +++ b/pkgs/os-specific/linux/pscircle/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "pscircle-${version}"; - version = "1.0.0"; + version = "1.1.0"; src = fetchFromGitLab { owner = "mildlyparallel"; repo = "pscircle"; rev = "v${version}"; - sha256 = "188d0db62215pycmx2qfmbbjpmih03vigsz2j448zhsbyxapavv3"; + sha256 = "1sxdnhkcr26l29nk0zi1zkvkd7128xglfql47rdb1bx940vflgb6"; }; buildInputs = [ diff --git a/pkgs/os-specific/linux/psmisc/default.nix b/pkgs/os-specific/linux/psmisc/default.nix index 8b3906dedb1f..68e51afdf1bb 100644 --- a/pkgs/os-specific/linux/psmisc/default.nix +++ b/pkgs/os-specific/linux/psmisc/default.nix @@ -15,7 +15,11 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoconf automake gettext ]; buildInputs = [ ncurses ]; - preConfigure = '' + preConfigure = stdenv.lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' + # Goes past the rpl_malloc linking failure + export ac_cv_func_malloc_0_nonnull=yes + export ac_cv_func_realloc_0_nonnull=yes + '' + '' echo $version > .tarball-version ./autogen.sh ''; diff --git a/pkgs/os-specific/linux/roccat-tools/default.nix b/pkgs/os-specific/linux/roccat-tools/default.nix index a413008ffd1a..c2fb55b344b4 100644 --- a/pkgs/os-specific/linux/roccat-tools/default.nix +++ b/pkgs/os-specific/linux/roccat-tools/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, cmake, pkgconfig, gettext -, dbus, dbus_glib, libgaminggear, libgudev, lua +, dbus, dbus-glib, libgaminggear, libgudev, lua }: stdenv.mkDerivation rec { @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { ''; nativeBuildInputs = [ cmake pkgconfig gettext ]; - buildInputs = [ dbus dbus_glib libgaminggear libgudev lua ]; + buildInputs = [ dbus dbus-glib libgaminggear libgudev lua ]; enableParallelBuilding = true; diff --git a/pkgs/os-specific/linux/systemd-wait/default.nix b/pkgs/os-specific/linux/systemd-wait/default.nix new file mode 100644 index 000000000000..114f4c2444e6 --- /dev/null +++ b/pkgs/os-specific/linux/systemd-wait/default.nix @@ -0,0 +1,25 @@ +{ python3Packages, fetchFromGitHub, lib }: + +python3Packages.buildPythonApplication rec { + pname = "systemd-wait"; + version = "0.1+2018-10-05"; + + src = fetchFromGitHub { + owner = "Stebalien"; + repo = pname; + rev = "bbb58dd4584cc08ad20c3888edb7628f28aee3c7"; + sha256 = "1l8rd0wzf3m7fk0g1c8wc0csdisdfac0filhixpgp0ck9ignayq5"; + }; + + propagatedBuildInputs = with python3Packages; [ + dbus-python pygobject3 + ]; + + meta = { + homepage = https://github.com/Stebalien/systemd-wait; + license = lib.licenses.gpl3; + description = "Wait for a systemd unit to enter a specific state"; + maintainers = [ lib.maintainers.benley ]; + platforms = lib.platforms.linux; + }; +} diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 96c82a6d9f88..db64b8e6f6de 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -26,8 +26,8 @@ in stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "NixOS"; repo = "systemd"; - rev = "21efe60844fda21039c052442076dabcf8643a90"; - sha256 = "0aqifjsb0kaxnqy5nlmzvyzgfd99lm60k1494lbnnk8ahdh8ab07"; + rev = "31859ddd35fc3fa82a583744caa836d356c31d7f"; + sha256 = "1xci0491j95vdjgs397n618zii3sgwnvanirkblqqw6bcvcjvir1"; }; outputs = [ "out" "lib" "man" "dev" ]; diff --git a/pkgs/os-specific/linux/udisks/2-default.nix b/pkgs/os-specific/linux/udisks/2-default.nix index a816a2139395..4f59828098c3 100644 --- a/pkgs/os-specific/linux/udisks/2-default.nix +++ b/pkgs/os-specific/linux/udisks/2-default.nix @@ -2,7 +2,7 @@ , gnome3, gtk-doc, acl, systemd, glib, libatasmart, polkit, coreutils, bash , expat, libxslt, docbook_xsl, utillinux, mdadm, libgudev, libblockdev, parted , gobjectIntrospection, docbook_xml_dtd_412, docbook_xml_dtd_43 -, libxfs, f2fs-tools, dosfstools, e2fsprogs, btrfs-progs, exfat, nilfs-utils, ntfs3g +, xfsprogs, f2fs-tools, dosfstools, e2fsprogs, btrfs-progs, exfat, nilfs-utils, ntfs3g }: let @@ -33,7 +33,7 @@ in stdenv.mkDerivation rec { }) (substituteAll { src = ./force-path.patch; - path = stdenv.lib.makeBinPath [ btrfs-progs coreutils dosfstools e2fsprogs exfat f2fs-tools nilfs-utils libxfs ntfs3g parted utillinux ]; + path = stdenv.lib.makeBinPath [ btrfs-progs coreutils dosfstools e2fsprogs exfat f2fs-tools nilfs-utils xfsprogs ntfs3g parted utillinux ]; }) ]; diff --git a/pkgs/os-specific/linux/v4l2loopback/default.nix b/pkgs/os-specific/linux/v4l2loopback/default.nix index 3db2814a0878..2e22b99a95f3 100644 --- a/pkgs/os-specific/linux/v4l2loopback/default.nix +++ b/pkgs/os-specific/linux/v4l2loopback/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "v4l2loopback-${version}-${kernel.version}"; - version = "0.11.0"; + version = "0.12.0"; src = fetchFromGitHub { owner = "umlaeute"; repo = "v4l2loopback"; rev = "v${version}"; - sha256 = "1wb5qmy13w8rl4279bwp69s4sb1x5hk5d2n563p1yk8yi567p2az"; + sha256 = "1rf8dvabksxb2sj14j32h7n7pw7byqfnpqs4m4afj3398y9y23c4"; }; hardeningDisable = [ "format" "pic" ]; |