From 46b9e5c3d4a2fa8f69da8a7d913f6751c5ecb58e Mon Sep 17 00:00:00 2001 From: volth Date: Mon, 13 May 2019 03:50:52 +0000 Subject: nixos/enlightenment: fix build with config.allowAliases=false --- nixos/modules/services/x11/desktop-managers/enlightenment.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos') diff --git a/nixos/modules/services/x11/desktop-managers/enlightenment.nix b/nixos/modules/services/x11/desktop-managers/enlightenment.nix index 04e380b61530e..5c6028fd2e113 100644 --- a/nixos/modules/services/x11/desktop-managers/enlightenment.nix +++ b/nixos/modules/services/x11/desktop-managers/enlightenment.nix @@ -34,7 +34,7 @@ in pkgs.gtk2 # To get GTK+'s themes. pkgs.tango-icon-theme - pkgs.gnome2.gnomeicontheme + pkgs.gnome2.gnome_icon_theme pkgs.xorg.xcursorthemes ]; -- cgit 1.4.1 From d7decccc2864968afa772e4b23606cee005f30e6 Mon Sep 17 00:00:00 2001 From: volth Date: Mon, 13 May 2019 04:48:55 +0000 Subject: nixos/pantheon: fix build with config.allowAliases=false --- nixos/modules/services/x11/desktop-managers/pantheon.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos') diff --git a/nixos/modules/services/x11/desktop-managers/pantheon.nix b/nixos/modules/services/x11/desktop-managers/pantheon.nix index e1eeb32aa1a08..a861b122d5d98 100644 --- a/nixos/modules/services/x11/desktop-managers/pantheon.nix +++ b/nixos/modules/services/x11/desktop-managers/pantheon.nix @@ -190,7 +190,7 @@ in ]); fonts.fonts = with pkgs; [ - opensans-ttf + open-sans roboto-mono pantheon.elementary-redacted-script # needed by screenshot-tool ]; -- cgit 1.4.1 From b2ce867a91e8b39b4a73e16c96b17b36a62f913e Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Thu, 13 Jun 2019 17:09:02 -0400 Subject: phabricator: remove unreferenced test --- nixos/tests/phabricator.nix | 77 --------------------------------------------- 1 file changed, 77 deletions(-) delete mode 100644 nixos/tests/phabricator.nix (limited to 'nixos') diff --git a/nixos/tests/phabricator.nix b/nixos/tests/phabricator.nix deleted file mode 100644 index db23331842cbe..0000000000000 --- a/nixos/tests/phabricator.nix +++ /dev/null @@ -1,77 +0,0 @@ -import ./make-test.nix ({ pkgs, ... }: { - name = "phabricator"; - meta = with pkgs.stdenv.lib.maintainers; { - maintainers = [ ]; - }; - - nodes = { - storage = - { ... }: - { services.nfs.server.enable = true; - services.nfs.server.exports = '' - /repos 192.168.1.0/255.255.255.0(rw,no_root_squash) - ''; - services.nfs.server.createMountPoints = true; - }; - - webserver = - { pkgs, ... }: - { fileSystems = pkgs.lib.mkVMOverride - [ { mountPoint = "/repos"; - device = "storage:/repos"; - fsType = "nfs"; - } - ]; - networking.firewall.enable = false; - networking.useDHCP = false; - - services = { - httpd = { - enable = true; - adminAddr = "root@localhost"; - virtualHosts = [{ - hostName = "phabricator.local"; - extraSubservices = [{serviceType = "phabricator";}]; - }]; - }; - - phd = { - enable = true; - }; - - mysql = { - enable = true; - package = pkgs.mysql; - extraOptions = '' - sql_mode=STRICT_ALL_TABLES - ''; - }; - }; - - environment.systemPackages = [ pkgs.php ]; - }; - - client = - { ... }: - { imports = [ ./common/x11.nix ]; - services.xserver.desktopManager.plasma5.enable = true; - }; - }; - - testScript = - '' - startAll; - - $client->waitForX; - - $webserver->waitForUnit("mysql"); - $webserver->waitForUnit("httpd"); - $webserver->execute("cd /nix/store; less >/repos/log1"); - - $client->sleep(30); # loading takes a long time - $client->execute("konqueror http://webserver/ &"); - $client->sleep(90); # loading takes a long time - - $client->screenshot("screen"); - ''; -}) -- cgit 1.4.1 From e278ff48bc290c8b0a1d92bf15972b2d3ecc0938 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Thu, 13 Jun 2019 17:09:45 -0400 Subject: nixos/phd: remove unmaintained service --- nixos/modules/module-list.nix | 1 - nixos/modules/services/misc/phd.nix | 52 ------------------------------------- 2 files changed, 53 deletions(-) delete mode 100644 nixos/modules/services/misc/phd.nix (limited to 'nixos') diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 4f841ecfe0da9..e29ba17ba86fd 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -442,7 +442,6 @@ ./services/misc/packagekit.nix ./services/misc/paperless.nix ./services/misc/parsoid.nix - ./services/misc/phd.nix ./services/misc/plex.nix ./services/misc/tautulli.nix ./services/misc/pykms.nix diff --git a/nixos/modules/services/misc/phd.nix b/nixos/modules/services/misc/phd.nix deleted file mode 100644 index e605ce5de16e2..0000000000000 --- a/nixos/modules/services/misc/phd.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; - -let - - cfg = config.services.phd; - -in - -{ - - ###### interface - - options = { - - services.phd = { - - enable = mkOption { - default = false; - description = " - Enable daemons for phabricator. - "; - }; - - }; - - }; - - ###### implementation - - config = mkIf cfg.enable { - - systemd.services.phd = { - path = [ pkgs.phabricator pkgs.php pkgs.mercurial pkgs.git pkgs.subversion ]; - - after = [ "httpd.service" ]; - wantedBy = [ "multi-user.target" ]; - - serviceConfig = { - ExecStart = "${pkgs.phabricator}/phabricator/bin/phd start"; - ExecStop = "${pkgs.phabricator}/phabricator/bin/phd stop"; - User = "wwwrun"; - RestartSec = "30s"; - Restart = "always"; - StartLimitInterval = "1m"; - }; - }; - - }; - -} -- cgit 1.4.1 From a49b546c92e0b221d4a81398caf02484641e1f7f Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Thu, 13 Jun 2019 17:10:12 -0400 Subject: nixos/httpd: remove unmaintained subservice (phabricator) --- .../web-servers/apache-httpd/phabricator.nix | 50 ---------------------- 1 file changed, 50 deletions(-) delete mode 100644 nixos/modules/services/web-servers/apache-httpd/phabricator.nix (limited to 'nixos') diff --git a/nixos/modules/services/web-servers/apache-httpd/phabricator.nix b/nixos/modules/services/web-servers/apache-httpd/phabricator.nix deleted file mode 100644 index efd4a7b5f0fb9..0000000000000 --- a/nixos/modules/services/web-servers/apache-httpd/phabricator.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; - -let - phabricatorRoot = pkgs.phabricator; -in { - - enablePHP = true; - extraApacheModules = [ "mod_rewrite" ]; - DocumentRoot = "${phabricatorRoot}/phabricator/webroot"; - - options = { - git = mkOption { - default = true; - description = "Enable git repositories."; - }; - mercurial = mkOption { - default = true; - description = "Enable mercurial repositories."; - }; - subversion = mkOption { - default = true; - description = "Enable subversion repositories."; - }; - }; - - extraConfig = '' - DocumentRoot ${phabricatorRoot}/phabricator/webroot - - RewriteEngine on - RewriteRule ^/rsrc/(.*) - [L,QSA] - RewriteRule ^/favicon.ico - [L,QSA] - RewriteRule ^(.*)$ /index.php?__path__=$1 [B,L,QSA] - ''; - - extraServerPath = [ - "${pkgs.which}" - "${pkgs.diffutils}" - ] ++ - (if config.mercurial then ["${pkgs.mercurial}"] else []) ++ - (if config.subversion then ["${pkgs.subversion.out}"] else []) ++ - (if config.git then ["${pkgs.git}"] else []); - - startupScript = pkgs.writeScript "activatePhabricator" '' - mkdir -p /var/repo - chown wwwrun /var/repo - ''; - -} -- cgit 1.4.1 From 3fabe1accbf44059caa05790c2d1afa0f32dd447 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Sat, 15 Jun 2019 07:02:11 -0400 Subject: nixos/release-notes: add entry for phabricator --- nixos/doc/manual/release-notes/rl-1909.xml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'nixos') diff --git a/nixos/doc/manual/release-notes/rl-1909.xml b/nixos/doc/manual/release-notes/rl-1909.xml index 51a894269d9b9..401778f38b9a4 100644 --- a/nixos/doc/manual/release-notes/rl-1909.xml +++ b/nixos/doc/manual/release-notes/rl-1909.xml @@ -236,6 +236,12 @@ so you'll need to set back to speex-float-1. + + + The phabricator package and associated httpd.extraSubservice, as well as the + phd service have been removed from nixpkgs due to lack of maintainer. + + -- cgit 1.4.1 From ccc6ffe2dc14ab961857f50e51119026a69a8dac Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sat, 15 Jun 2019 20:13:35 +0200 Subject: flatpak-builder: add installed tests --- nixos/tests/all-tests.nix | 1 + nixos/tests/flatpak-builder.nix | 19 ++++ pkgs/development/tools/flatpak-builder/default.nix | 38 ++++++- .../tools/flatpak-builder/fix-test-paths.patch | 111 +++++++++++++++++++++ 4 files changed, 168 insertions(+), 1 deletion(-) create mode 100644 nixos/tests/flatpak-builder.nix create mode 100644 pkgs/development/tools/flatpak-builder/fix-test-paths.patch (limited to 'nixos') diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 8b38e802e62ed..4f3d46430ff33 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -82,6 +82,7 @@ in fish = handleTest ./fish.nix {}; flannel = handleTestOn ["x86_64-linux"] ./flannel.nix {}; flatpak = handleTest ./flatpak.nix {}; + flatpak-builder = handleTest ./flatpak-builder.nix {}; fsck = handleTest ./fsck.nix {}; fwupd = handleTestOn ["x86_64-linux"] ./fwupd.nix {}; # libsmbios is unsupported on aarch64 gdk-pixbuf = handleTest ./gdk-pixbuf.nix {}; diff --git a/nixos/tests/flatpak-builder.nix b/nixos/tests/flatpak-builder.nix new file mode 100644 index 0000000000000..2100631ec7f43 --- /dev/null +++ b/nixos/tests/flatpak-builder.nix @@ -0,0 +1,19 @@ +# run installed tests +import ./make-test.nix ({ pkgs, ... }: + +{ + name = "flatpak-builder"; + meta = { + maintainers = pkgs.flatpak-builder.meta.maintainers; + }; + + machine = { pkgs, ... }: { + services.flatpak.enable = true; + environment.systemPackages = with pkgs; [ gnome-desktop-testing flatpak-builder ] ++ flatpak-builder.installedTestsDependencies; + virtualisation.diskSize = 2048; + }; + + testScript = '' + $machine->succeed("gnome-desktop-testing-runner -d '${pkgs.flatpak-builder.installedTests}/share' --timeout 3600"); + ''; +}) diff --git a/pkgs/development/tools/flatpak-builder/default.nix b/pkgs/development/tools/flatpak-builder/default.nix index b5d2583d5d2f0..fa00b8e5f890f 100644 --- a/pkgs/development/tools/flatpak-builder/default.nix +++ b/pkgs/development/tools/flatpak-builder/default.nix @@ -24,6 +24,9 @@ , flatpak , gitMinimal , glib +, glibcLocales +, gnumake +, gnupg , gnutar , json-glib , libcap @@ -32,16 +35,19 @@ , libyaml , ostree , patch +, python2 , rpm , unzip }: let + installed_testdir = "${placeholder "installedTests"}/libexec/installed-tests/flatpak-builder"; + installed_test_metadir = "${placeholder "installedTests"}/share/installed-tests/flatpak-builder"; version = "1.0.7"; in stdenv.mkDerivation rec { name = "flatpak-builder-${version}"; - outputs = [ "out" "doc" "man" ]; + outputs = [ "out" "doc" "man" "installedTests" ]; src = fetchurl { url = "https://github.com/flatpak/flatpak-builder/releases/download/${version}/${name}.tar.xz"; @@ -95,8 +101,38 @@ in stdenv.mkDerivation rec { eustrip = "${elfutils}/bin/eu-strip"; euelfcompress = "${elfutils}/bin/eu-elfcompress"; }) + + # The test scripts in Flatpak repo were updated so we are basing + # this on our patch for Flatpak 0.99. + (substituteAll { + src = ./fix-test-paths.patch; + inherit glibcLocales python2; + }) ]; + configureFlags = [ + "--enable-installed-tests" + ]; + + makeFlags = [ + "installed_testdir=${installed_testdir}" + "installed_test_metadir=${installed_test_metadir}" + ]; + + # Some scripts used by tests need to use shebangs that are available in Flatpak runtimes. + dontPatchShebangs = true; + + # Installed tests + postFixup = '' + for file in ${installed_testdir}/{test-builder.sh,test-builder-python.sh}; do + patchShebangs $file + done + ''; + + passthru = { + installedTestsDependencies = [ gnupg ostree python2 gnumake ]; + }; + meta = with stdenv.lib; { description = "Tool to build flatpaks from source"; homepage = https://flatpak.org/; diff --git a/pkgs/development/tools/flatpak-builder/fix-test-paths.patch b/pkgs/development/tools/flatpak-builder/fix-test-paths.patch new file mode 100644 index 0000000000000..96212a30fcf8c --- /dev/null +++ b/pkgs/development/tools/flatpak-builder/fix-test-paths.patch @@ -0,0 +1,111 @@ +--- a/tests/libtest.sh ++++ b/tests/libtest.sh +@@ -301,7 +301,7 @@ + } + + skip_without_python2 () { +- if ! test -f /usr/bin/python2 || ! /usr/bin/python2 -c "import sys; sys.exit(0 if sys.version_info >= (2, 7) else 1)" ; then ++ if ! test -f @python2@/bin/python2 || ! @python2@/bin/python2 -c "import sys; sys.exit(0 if sys.version_info >= (2, 7) else 1)" ; then + echo "1..0 # SKIP this test requires /usr/bin/python2 (2.7) support" + exit 0 + fi +--- a/tests/make-test-runtime.sh ++++ b/tests/make-test-runtime.sh +@@ -26,6 +26,7 @@ + PATH="$PATH:/usr/sbin:/sbin" + + # Add bash and dependencies ++mkdir -p ${DIR}/nix/store + mkdir -p ${DIR}/usr/bin + mkdir -p ${DIR}/usr/lib + ln -s ../lib ${DIR}/usr/lib64 +@@ -35,73 +36,28 @@ + else + cp `which ldconfig` ${DIR}/usr/bin + fi +-LIBS=`mktemp` +-BINS=`mktemp` +- +-add_bin() { +- local f=$1 +- shift +- +- if grep -qFe "${f}" $BINS; then +- # Already handled +- return 0 +- fi +- +- echo $f >> $BINS +- +- # Add library dependencies +- (ldd "${f}" | sed "s/.* => //" | awk '{ print $1}' | grep ^/ | sort -u -o $LIBS $LIBS -) || true +- +- local shebang=$(sed -n '1s/^#!\([^ ]*\).*/\1/p' "${f}") +- if [ x$shebang != x ]; then +- add_bin "$shebang" +- fi +-} + + for i in $@; do +- I=`which $i` +- add_bin $I +- if test $i == python2; then +- mkdir -p ${DIR}/usr/lib/python2.7/lib-dynload +- # This is a hardcoded minimal set of modules we need in the current tests. +- # Pretty hacky stuff. Add modules as needed. +- PYDIR=/usr/lib/python2.7 +- if test -d /usr/lib64/python2.7; then PYDIR=/usr/lib64/python2.7; fi +- for py in site os stat posixpath genericpath warnings \ +- linecache types UserDict abc _abcoll \ +- _weakrefset copy_reg traceback sysconfig \ +- re sre_compile sre_parse sre_constants \ +- _sysconfigdata ; do +- cp ${PYDIR}/$py.py ${DIR}/usr/lib/python2.7 +- done +- # These might not exist, depending how Python was configured; and the +- # part after ${so} might be "module" or ".x86_64-linux-gnu" or +- # something else +- for so in _locale strop ; do +- cp ${PYDIR}/lib-dynload/${so}*.so ${DIR}/usr/lib/python2.7/lib-dynload || : +- done +- for plat in $( cd ${PYDIR} && echo plat-* ); do +- test -e ${PYDIR}/${plat} || continue +- mkdir -p ${DIR}/usr/lib/python2.7/${plat} +- cp ${PYDIR}/${plat}/*.py ${DIR}/usr/lib/python2.7/${plat}/ +- done +- fi +-done +-for i in `cat $BINS`; do +- echo Adding binary $i 1>&2 +- cp "$i" ${DIR}/usr/bin/ +-done +-for i in `cat $LIBS`; do +- echo Adding library $i 1>&2 +- cp "$i" ${DIR}/usr/lib/ ++ I=$(readlink -f $(which $i)) ++ requisites=$(nix-store --query --requisites "$I") ++ for r in $requisites; do ++ # a single store item can be needed by multiple paths, no need to copy it again ++ if [ ! -e ${DIR}/$r ]; then ++ cp -r $r ${DIR}/$r ++ fi ++ done ++ ln -s $I ${DIR}/usr/bin/$i + done + ln -s bash ${DIR}/usr/bin/sh + +-# We copy the C.UTF8 locale and call it en_US. Its a bit of a lie, but +-# the real en_US locale is often not available, because its in the +-# local archive. ++mv ${DIR}/nix/store ${DIR}/usr/store # files outside /usr are not permitted, we will have to replace /nix/store with /usr/store ++chmod -R u+w ${DIR} # nix store has read-only directories which would cause problems during clean-up, files need to be writable for sed ++find ${DIR} -type f -print0 | xargs -0 sed -i 's~/nix/store/~/usr/store/~g' # replace hardcoded paths ++find ${DIR} -type l | xargs -I '{}' sh -c 'tg="$(readlink "$1")"; newtg="${tg#/nix/store/}"; if [ "$tg" != "$newtg" ]; then ln -fs "/usr/store/$newtg" "$1"; fi' -- '{}' # replace symlink targets ++ ++# We copy the whole locale archive because we do not have C.UTF8 locale + mkdir -p ${DIR}/usr/lib/locale/ +-cp -r /usr/lib/locale/C.* ${DIR}/usr/lib/locale/en_US ++cp @glibcLocales@/lib/locale/locale-archive ${DIR}/usr/lib/locale/locale-archive + + if [ x$COLLECTION_ID != x ]; then + collection_args=--collection-id=${COLLECTION_ID} -- cgit 1.4.1