From 9efffe0135c1ff7fcefbcd5ba0e521b41e56bb56 Mon Sep 17 00:00:00 2001 From: Jörg Thalheim Date: Tue, 28 Aug 2018 22:17:54 +0100 Subject: hurd: cleanup unmaintained target This has been not touched in 6 years. Let's remove it to cause less problems when adding new cross-compiling infrastructure. This also simplify gcc significantly. --- pkgs/os-specific/gnu/default.nix | 113 --------------------- pkgs/os-specific/gnu/hurd/default.nix | 91 ----------------- pkgs/os-specific/gnu/libpthread/default.nix | 81 --------------- pkgs/os-specific/gnu/mach/default.nix | 57 ----------- pkgs/os-specific/gnu/mig/default.nix | 50 --------- pkgs/os-specific/gnu/mig/noyywrap.patch | 12 --- pkgs/os-specific/gnu/smbfs/default.nix | 44 -------- .../gnu/smbfs/samba-without-byte-range-locks.patch | 14 --- pkgs/os-specific/gnu/unionfs/default.nix | 43 -------- 9 files changed, 505 deletions(-) delete mode 100644 pkgs/os-specific/gnu/default.nix delete mode 100644 pkgs/os-specific/gnu/hurd/default.nix delete mode 100644 pkgs/os-specific/gnu/libpthread/default.nix delete mode 100644 pkgs/os-specific/gnu/mach/default.nix delete mode 100644 pkgs/os-specific/gnu/mig/default.nix delete mode 100644 pkgs/os-specific/gnu/mig/noyywrap.patch delete mode 100644 pkgs/os-specific/gnu/smbfs/default.nix delete mode 100644 pkgs/os-specific/gnu/smbfs/samba-without-byte-range-locks.patch delete mode 100644 pkgs/os-specific/gnu/unionfs/default.nix (limited to 'pkgs/os-specific') diff --git a/pkgs/os-specific/gnu/default.nix b/pkgs/os-specific/gnu/default.nix deleted file mode 100644 index d57600035256..000000000000 --- a/pkgs/os-specific/gnu/default.nix +++ /dev/null @@ -1,113 +0,0 @@ -# Packages that make up the GNU/Hurd operating system (aka. GNU). - -args@{ fetchgit, stdenv, autoconf, automake, automake111x, libtool -, texinfo, glibcCross, hurdPartedCross, libuuid, samba -, gccCrossStageStatic, gcc -, pkgsi686Linux, newScope, config -, targetPlatform, buildPlatform -, overrides ? {} -, buildPackages, pkgs -}: - -with args; - -let - callPackage = newScope gnu; - - forcedNativePackages = - if stdenv.hostPlatform == stdenv.buildPlatform - then pkgs - else buildPackages; - - gnu = { - hurdCross = forcedNativePackages.callPackage ./hurd { - inherit fetchgit stdenv autoconf libtool texinfo - glibcCross hurdPartedCross; - inherit (gnu) machHeaders mig; - libuuid = libuuid.crossDrv; - automake = automake111x; - headersOnly = false; - cross = assert targetPlatform != buildPlatform; targetPlatform; - gccCross = gcc; - }; - - hurdCrossIntermediate = forcedNativePackages.callPackage ./hurd { - inherit fetchgit stdenv autoconf libtool texinfo glibcCross; - inherit (gnu) machHeaders mig; - hurdPartedCross = null; - libuuid = null; - automake = automake111x; - headersOnly = false; - cross = assert targetPlatform != buildPlatform; targetPlatform; - - # The "final" GCC needs glibc and the Hurd libraries (libpthread in - # particular) so we first need an intermediate Hurd built with the - # intermediate GCC. - gccCross = gccCrossStageStatic; - - # This intermediate Hurd is only needed to build libpthread, which needs - # libihash, and to build Parted, which needs libstore and - # libshouldbeinlibc. - buildTarget = "libihash libstore libshouldbeinlibc"; - installTarget = "libihash-install libstore-install libshouldbeinlibc-install"; - }; - - hurdHeaders = callPackage ./hurd { - automake = automake111x; - headersOnly = true; - gccCross = null; - glibcCross = null; - libuuid = null; - hurdPartedCross = null; - }; - - libpthreadHeaders = callPackage ./libpthread { - headersOnly = true; - hurd = null; - }; - - libpthreadCross = forcedNativePackages.callPackage ./libpthread { - inherit fetchgit stdenv autoconf automake libtool glibcCross; - inherit (gnu) machHeaders hurdHeaders; - hurd = gnu.hurdCrossIntermediate; - gccCross = gccCrossStageStatic; - cross = assert targetPlatform != buildPlatform; targetPlatform; - }; - - # In theory GNU Mach doesn't have to be cross-compiled. However, since it - # has to be built for i586 (it doesn't work on x86_64), one needs a cross - # compiler for that host. - mach = callPackage ./mach { - automake = automake111x; - }; - - machHeaders = callPackage ./mach { - automake = automake111x; - headersOnly = true; - mig = null; - }; - - mig = callPackage ./mig { - # Build natively, but force use of a 32-bit environment because we're - # targeting `i586-pc-gnu'. - stdenv = pkgsi686Linux.stdenv; - }; - - # XXX: Use this one for its `.crossDrv'. Using the one above from - # `x86_64-linux' leads to building a different cross-toolchain because of - # the `forceSystem'. - mig_raw = callPackage ./mig {}; - - smbfs = callPackage ./smbfs { - hurd = gnu.hurdCross; - }; - - unionfs = callPackage ./unionfs { - hurd = gnu.hurdCross; - }; - } - - # Allow callers to override elements of this attribute set. - // overrides; - -in gnu # we trust! diff --git a/pkgs/os-specific/gnu/hurd/default.nix b/pkgs/os-specific/gnu/hurd/default.nix deleted file mode 100644 index a0c4be0ff451..000000000000 --- a/pkgs/os-specific/gnu/hurd/default.nix +++ /dev/null @@ -1,91 +0,0 @@ -{ fetchgit, stdenv, autoconf, automake, libtool, texinfo -, machHeaders, mig, headersOnly ? true -, cross ? null, gccCross ? null, glibcCross ? null -, hurdPartedCross ? null, libuuid ? null -, buildTarget ? "all", installTarget ? "install" }: - -assert (cross != null) -> (gccCross != null); -assert (hurdPartedCross != null) -> (libuuid != null); - -let - # Unfortunately we can't use `master@{DATE}', see - # . - date = "20111115"; - rev = "969fbb646ffd89a482302e303eaded79781c3331"; - suffix = if headersOnly - then "-headers" - else (if buildTarget != "all" - then "-minimal" - else ""); -in -stdenv.mkDerivation ({ - name = "hurd${suffix}-${date}"; - - src = fetchgit { - url = "git://git.sv.gnu.org/hurd/hurd.git"; - sha256 = "b7f57ec2c6dcaf35ec03fb7979eb5506180ce4c6e2edf60a587f12ac5b11f004"; - inherit rev; - }; - - buildInputs = [ autoconf automake libtool texinfo mig ] - ++ stdenv.lib.optional (hurdPartedCross != null) hurdPartedCross - ++ stdenv.lib.optional (libuuid != null) libuuid - ++ stdenv.lib.optional (gccCross != null) gccCross - ++ stdenv.lib.optional (glibcCross != null) glibcCross; - - propagatedBuildInputs = [ machHeaders ]; - - configureFlags = stdenv.lib.optionals headersOnly [ "--build=i586-pc-gnu" ] - ++ (if hurdPartedCross != null - then [ "--with-parted" ] - else [ "--without-parted" ]); - - # Use `preConfigure' only for `autoreconf', so that users know they can - # simply clear it when the autoconf phase is unneeded. - preConfigure = "autoreconf -vfi"; - - postConfigure = - '' echo "removing \`-o root' from makefiles..." - for mf in {utils,daemons}/Makefile - do - sed -i "$mf" -e's/-o root//g' - done - ''; - - # Not needed after https://github.com/NixOS/nixpkgs/pull/43833 - dontPatchShebangs = stdenv.hostPlatform != stdenv.buildPlatform; - - meta = { - description = "The GNU Hurd, GNU project's replacement for the Unix kernel"; - - longDescription = - '' The GNU Hurd is the GNU project's replacement for the Unix kernel. - It is a collection of servers that run on the Mach microkernel to - implement file systems, network protocols, file access control, and - other features that are implemented by the Unix kernel or similar - kernels (such as Linux). - ''; - - license = stdenv.lib.licenses.gpl2Plus; - - homepage = http://www.gnu.org/software/hurd/; - - maintainers = [ stdenv.lib.maintainers.ludo ]; - }; -} - -// - -stdenv.lib.optionalAttrs (!headersOnly && buildTarget != null) { - # Use the default `buildPhase' and `installPhase' so that the usual hooks - # can still be used. - buildFlags = buildTarget; - installTargets = assert installTarget != null; installTarget; -} - -// - -stdenv.lib.optionalAttrs headersOnly { - dontBuild = true; - installPhase = "make install-headers"; -}) diff --git a/pkgs/os-specific/gnu/libpthread/default.nix b/pkgs/os-specific/gnu/libpthread/default.nix deleted file mode 100644 index a2e1081a1e8d..000000000000 --- a/pkgs/os-specific/gnu/libpthread/default.nix +++ /dev/null @@ -1,81 +0,0 @@ -{ fetchgit, stdenv, autoconf, automake, libtool -, machHeaders, hurdHeaders, hurd, headersOnly ? false -, cross ? null, gccCross ? null, glibcCross ? null }: - -assert (cross != null) -> (gccCross != null) && (glibcCross != null); -assert (!headersOnly) -> (hurd != null); - -let - date = "20111020"; - - # Use the `tschwinge/Peter_Herbolzheimer' branch as prescribed in - # . - rev = "a7b82c3302bf9c47176648eb802a61ae2d9a16f5"; -in -stdenv.mkDerivation ({ - name = "libpthread-hurd-${if headersOnly then "headers-" else ""}${date}"; - - src = fetchgit { - url = "git://git.sv.gnu.org/hurd/libpthread.git"; - sha256 = "e8300762914d927c0da4168341a5982a1057613e1af363ee68942087b2570b3d"; - inherit rev; - }; - - nativeBuildInputs = [ autoconf automake libtool ]; - buildInputs = [ machHeaders hurdHeaders ] - ++ stdenv.lib.optional (!headersOnly) hurd - ++ stdenv.lib.optional (gccCross != null) gccCross; - - preConfigure = "autoreconf -vfi"; - - meta = { - description = "GNU Hurd's libpthread"; - - license = stdenv.lib.licenses.lgpl2Plus; - - maintainers = [ stdenv.lib.maintainers.ludo ]; - }; -} - -// - -(if headersOnly - then { - configureFlags = - [ "--build=i586-pc-gnu" - "ac_cv_lib_ihash_hurd_ihash_create=yes" - ]; - - dontBuild = true; - installPhase = "make install-data-local-headers"; - } - else { }) - -// - -(if cross != null - then { - # Tell gcc where to find `crt1.o' et al. This is specified in two - # different ways: one for gcc as run from `configure', and one for linking - # libpthread.so (by default `libtool --mode=link' swallows `-B', hence - # this workaround; see - # .) - LDFLAGS = "-B${glibcCross}/lib"; - makeFlags = [ "LDFLAGS=-Wc,-B${glibcCross}/lib" ]; - - # Help the linker find glibc. - CPATH = "${glibcCross}/include"; - LIBRARY_PATH = "${glibcCross}/lib"; - - passthru = { - # Extra target LDFLAGS to allow the cross-linker to find the - # dependencies of the cross libpthread.so, namely libihash.so. - # Note: these are raw `ld' flags, so `-Wl,' must be prepended when using - # `gcc'. - # - # This is actually only useful while building the final cross-gcc, since - # afterwards gcc-cross-wrapper should add the relevant flags. - TARGET_LDFLAGS = "-rpath-link=${hurd}/lib"; - }; - } - else { })) diff --git a/pkgs/os-specific/gnu/mach/default.nix b/pkgs/os-specific/gnu/mach/default.nix deleted file mode 100644 index 852b400ccb14..000000000000 --- a/pkgs/os-specific/gnu/mach/default.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ fetchgit, stdenv, mig ? null, autoconf, automake, texinfo -, headersOnly ? false }: - -assert (!headersOnly) -> (mig != null); - -let - date = "20120303"; - rev = "2a603e88f86bee88e013c2451eacf076fbcaed81"; -in -stdenv.mkDerivation ({ - name = "gnumach${if headersOnly then "-headers" else ""}-${date}"; - - src = fetchgit { - url = "git://git.sv.gnu.org/hurd/gnumach.git"; - sha256 = "1q8zk8xzbiwpnvvmfgkylj4gwkvkn5n2ydy9j054qv5plnaczj1c"; - inherit rev; - }; - - configureFlags = - stdenv.lib.optional headersOnly "--build=i586-pc-gnu" # cheat - - # Always enable dependency tracking. See - # . - ++ [ "--enable-dependency-tracking" ]; - - nativeBuildInputs = [ autoconf automake texinfo ] - ++ stdenv.lib.optional (mig != null) mig; - - preConfigure = "autoreconf -vfi"; - - meta = { - description = "GNU Mach, the microkernel used by the GNU Hurd"; - - longDescription = - '' GNU Mach is the microkernel that the GNU Hurd system is based on. - - It is maintained by the Hurd developers for the GNU project and - remains compatible with Mach 3.0. - - The majority of GNU Mach's device drivers are from Linux 2.0. They - were added using glue code, i.e., a Linux emulation layer in Mach. - ''; - - license = stdenv.lib.licenses.gpl2Plus; - - homepage = http://www.gnu.org/software/hurd/microkernel/mach/gnumach.html; - - maintainers = [ stdenv.lib.maintainers.ludo ]; - platforms = [ "i586-gnu" ]; - }; -} - -// - -(if headersOnly - then { dontBuild = true; installPhase = "make install-data"; } - else {})) diff --git a/pkgs/os-specific/gnu/mig/default.nix b/pkgs/os-specific/gnu/mig/default.nix deleted file mode 100644 index d138011d595b..000000000000 --- a/pkgs/os-specific/gnu/mig/default.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ fetchgit, stdenv, autoconf, automake, flex, bison, machHeaders, bash }: - -let - date = "20100512"; - rev = "4fee6a5652f609cb68cdbd9049d4da7a194f15f8"; -in -stdenv.mkDerivation { - name = "mig-${date}"; - - src = fetchgit { - url = "git://git.sv.gnu.org/hurd/mig.git"; - sha256 = "d6958d9b60925d4600aac133c9505bc873a16b203c69260bd0fb228922ee9273"; - inherit rev; - }; - - patches = [ ./noyywrap.patch ]; - - nativeBuildInputs = [ autoconf automake flex bison machHeaders ]; - - preConfigure = "autoreconf -vfi"; - - doCheck = true; - - # Fix the shebang to point to the cross-built shell. Won't be needed - # after #43833. - postInstall = '' - sed -i "$out/bin/mig" -e 's|^#!/.*|#!${bash}/bin/sh|g' - ''; - - meta = { - description = "GNU MIG, the Mach interface generator"; - - longDescription = - '' GNU MIG is the GNU distribution of the Mach 3.0 interface generator - MIG, as maintained by the GNU Hurd developers for the GNU project. - - You need this tool to compile the GNU Mach and GNU Hurd - distributions, and to compile the GNU C library for the Hurd. Also, - you will need it for other software in the GNU system that uses - Mach-based inter-process communication. - ''; - - license = stdenv.lib.licenses.gpl2Plus; - - homepage = http://www.gnu.org/software/hurd/microkernel/mach/mig/gnu_mig.html; - - # platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux; # really GNU/Hurd - maintainers = [ stdenv.lib.maintainers.ludo ]; - }; -} diff --git a/pkgs/os-specific/gnu/mig/noyywrap.patch b/pkgs/os-specific/gnu/mig/noyywrap.patch deleted file mode 100644 index 40ca6171f64b..000000000000 --- a/pkgs/os-specific/gnu/mig/noyywrap.patch +++ /dev/null @@ -1,12 +0,0 @@ -Fix undefined reference to `yywrap'. - -diff --git a/lexxer.l b/lexxer.l -index 9725d0b..15264bc 100644 ---- a/lexxer.l -+++ b/lexxer.l -@@ -1,4 +1,5 @@ - %option nounput -+%option noyywrap - - %k 10000 - %n 5000 diff --git a/pkgs/os-specific/gnu/smbfs/default.nix b/pkgs/os-specific/gnu/smbfs/default.nix deleted file mode 100644 index 6f3d719d8169..000000000000 --- a/pkgs/os-specific/gnu/smbfs/default.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ fetchcvs, stdenv, hurd, machHeaders, samba }: - -let - date = "2012-03-15"; - samba_patched = stdenv.lib.overrideDerivation samba (attrs: { - patches = attrs.patches ++ [ ./samba-without-byte-range-locks.patch ]; - }); -in -stdenv.mkDerivation rec { - name = "smbfs-${date}"; - - src = fetchcvs { - cvsRoot = ":pserver:anonymous@cvs.savannah.nongnu.org:/sources/hurdextras"; - module = "smbfs"; - sha256 = "5941d1a5da4488cbf0efe9aa0b41fe4ff5ba57b84ed24f7ff7c0feda4501d3e3"; - inherit date; - }; - - patchPhase = - '' sed -i "Makefile" \ - -e 's|gcc|i586-pc-gnu-gcc|g ; - s|^LDFLAGS=\(.*\)$|LDFLAGS=\1 -pthread|g' - ''; - - buildInputs = [ hurd machHeaders samba_patched ]; - - installPhase = - '' mkdir -p "$out/hurd" - cp -v smbfs "$out/hurd" - - mkdir -p "$out/share/doc/${name}" - cp -v README "$out/share/doc/${name}" - ''; - - meta = { - description = "SMB/CIFS file system translator for GNU/Hurd"; - - homepage = http://www.nongnu.org/hurdextras/; - - license = stdenv.lib.licenses.gpl3Plus; - - maintainers = [ stdenv.lib.maintainers.ludo ]; - }; -} diff --git a/pkgs/os-specific/gnu/smbfs/samba-without-byte-range-locks.patch b/pkgs/os-specific/gnu/smbfs/samba-without-byte-range-locks.patch deleted file mode 100644 index 893a29c75398..000000000000 --- a/pkgs/os-specific/gnu/smbfs/samba-without-byte-range-locks.patch +++ /dev/null @@ -1,14 +0,0 @@ -Since GNU/Hurd doesn't support byte-range file locks, shamelessly -disable them to allow the SMB client library to work (it uses TDB -to access /etc/samba/private/secrets.tdb, for instance.) - ---- samba/lib/tdb/common/lock.c 2010-02-08 16:12:57.000000000 +0100 -+++ samba/lib/tdb/common/lock.c 2012-03-01 23:39:02.000000000 +0100 -@@ -48,7 +48,7 @@ int tdb_brlock(struct tdb_context *tdb, - struct flock fl; - int ret; - -- if (tdb->flags & TDB_NOLOCK) { -+ if (1) { - return 0; - } diff --git a/pkgs/os-specific/gnu/unionfs/default.nix b/pkgs/os-specific/gnu/unionfs/default.nix deleted file mode 100644 index 5e2f428130cd..000000000000 --- a/pkgs/os-specific/gnu/unionfs/default.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ fetchgit, stdenv, hurd, machHeaders, mig }: - -let - date = "20120313"; - rev = "64dfa4e12d93c13b676d1cd7d86f4f4004ebfafa"; -in -stdenv.mkDerivation rec { - name = "unionfs-${date}"; - - src = fetchgit { - url = "git://git.sv.gnu.org/hurd/unionfs.git"; - sha256 = "1c3d71112cb25f8f82719a16df936e43abcb1adb77af96c1bb100a8ad0889d65"; - inherit rev; - }; - - patchPhase = - '' sed -i "Makefile" \ - -e 's|gcc|i586-pc-gnu-gcc|g ; - s|-std=gnu99|-std=gnu99 -fgnu89-inline|g' - ''; - - makeFlags = [ "CC=i586-pc-gnu-gcc" ]; - buildInputs = [ hurd machHeaders ]; - nativeBuildInputs = [ mig ]; - - installPhase = - '' mkdir -p "$out/hurd" - cp -v unionfs "$out/hurd" - - mkdir -p "$out/share/doc/${name}" - cp -v [A-Z]* "$out/share/doc/${name}" - ''; - - meta = { - description = "Union file system translator for GNU/Hurd"; - - homepage = http://www.gnu.org/software/hurd/hurd/translator/unionfs.html; - - license = stdenv.lib.licenses.gpl2Plus; - - maintainers = [ stdenv.lib.maintainers.ludo ]; - }; -} -- cgit 1.4.1