Skip to content

Commit

Permalink
Merge pull request #37693 from jtojnar/min-nix-two
Browse files Browse the repository at this point in the history
treewide: Re-add reverted Nix 2 syntax features
  • Loading branch information
jtojnar committed Aug 30, 2018
2 parents 11dab7b + 3ddead7 commit 4caab41
Show file tree
Hide file tree
Showing 19 changed files with 40 additions and 53 deletions.
2 changes: 1 addition & 1 deletion pkgs/applications/backup/deja-dup/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ stdenv.mkDerivation rec {

propagatedUserEnvPkgs = [ duplicity ];

PKG_CONFIG_LIBNAUTILUS_EXTENSION_EXTENSIONDIR = "lib/nautilus/extensions-3.0";
PKG_CONFIG_LIBNAUTILUS_EXTENSION_EXTENSIONDIR = "${placeholder "out"}/lib/nautilus/extensions-3.0";

postInstall = ''
glib-compile-schemas $out/share/glib-2.0/schemas
Expand Down
15 changes: 10 additions & 5 deletions pkgs/applications/misc/qpdfview/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,16 @@ stdenv.mkDerivation {
src = fetchurl {
inherit (s) url sha256;
};

# TODO: revert this once placeholder is supported
preConfigure = ''
qmakeFlags="$qmakeFlags *.pro TARGET_INSTALL_PATH=$out/bin PLUGIN_INSTALL_PATH=$out/lib/qpdfview DATA_INSTALL_PATH=$out/share/qpdfview MANUAL_INSTALL_PATH=$out/share/man/man1 ICON_INSTALL_PATH=$out/share/icons/hicolor/scalable/apps LAUNCHER_INSTALL_PATH=$out/share/applications APPDATA_INSTALL_PATH=$out/share/appdata"
'';
qmakeFlags = [
"*.pro"
"TARGET_INSTALL_PATH=${placeholder "out"}/bin"
"PLUGIN_INSTALL_PATH=${placeholder "out"}/lib/qpdfview"
"DATA_INSTALL_PATH=${placeholder "out"}/share/qpdfview"
"MANUAL_INSTALL_PATH=${placeholder "out"}/share/man/man1"
"ICON_INSTALL_PATH=${placeholder "out"}/share/icons/hicolor/scalable/apps"
"LAUNCHER_INSTALL_PATH=${placeholder "out"}/share/applications"
"APPDATA_INSTALL_PATH=${placeholder "out"}/share/appdata"
];

meta = {
inherit (s) version;
Expand Down
2 changes: 1 addition & 1 deletion pkgs/desktops/gnome-3/apps/file-roller/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ stdenv.mkDerivation rec {

buildInputs = [ glib gtk json-glib libarchive file gnome3.defaultIconTheme libnotify nautilus ];

PKG_CONFIG_LIBNAUTILUS_EXTENSION_EXTENSIONDIR = "lib/nautilus/extensions-3.0";
PKG_CONFIG_LIBNAUTILUS_EXTENSION_EXTENSIONDIR = "${placeholder "out"}/lib/nautilus/extensions-3.0";

postPatch = ''
chmod +x postinstall.py # patchShebangs requires executable file
Expand Down
2 changes: 1 addition & 1 deletion pkgs/desktops/gnome-3/apps/gnome-characters/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
buildInputs = [ glib gtk3 gjs pango gnome3.gsettings-desktop-schemas gnome3.defaultIconTheme libunistring ];

mesonFlags = [
"-Ddbus_service_dir=share/dbus-1/services"
"-Ddbus_service_dir=${placeholder "out"}/share/dbus-1/services"
];

meta = with stdenv.lib; {
Expand Down
4 changes: 1 addition & 3 deletions pkgs/desktops/gnome-3/core/evolution-data-server/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@ stdenv.mkDerivation rec {
"-DENABLE_VALA_BINDINGS=ON"
"-DENABLE_INTROSPECTION=ON"
"-DCMAKE_SKIP_BUILD_RPATH=OFF"
"-DINCLUDE_INSTALL_DIR=${placeholder "dev"}/include"
];

postPatch = ''
cmakeFlags="-DINCLUDE_INSTALL_DIR=$dev/include $cmakeFlags"
'';

passthru = {
updateScript = gnome3.updateScript {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
];

mesonFlags = [
"-Dudev_dir=lib/udev"
"-Dudev_dir=${placeholder "out"}/lib/udev"
];

postPatch = ''
Expand Down
7 changes: 5 additions & 2 deletions pkgs/desktops/gnome-3/core/libgee/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,21 @@ in
stdenv.mkDerivation rec {
name = "${pname}-${version}";

outputs = [ "out" "dev" ];

src = fetchurl {
url = "mirror://gnome/sources/${pname}/${gnome3.versionBranch version}/${name}.tar.xz";
sha256 = "0c26x8gi3ivmhlbqcmiag4jwrkvcy28ld24j55nqr3jikb904a5v";
};

doCheck = true;

patches = [ ./fix_introspection_paths.patch ];

nativeBuildInputs = [ pkgconfig autoconf vala gobjectIntrospection ];
buildInputs = [ glib ];

PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_GIRDIR = "${placeholder "dev"}/share/gir-1.0";
PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_TYPELIBDIR = "${placeholder "out"}/lib/girepository-1.0";

passthru = {
updateScript = gnome3.updateScript {
packageName = pname;
Expand Down
13 changes: 0 additions & 13 deletions pkgs/desktops/gnome-3/core/libgee/fix_introspection_paths.patch

This file was deleted.

2 changes: 1 addition & 1 deletion pkgs/desktops/gnome-3/core/totem/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
'';

mesonFlags = [
"-Dwith-nautilusdir=lib/nautilus/extensions-3.0"
"-Dwith-nautilusdir=${placeholder "out"}/lib/nautilus/extensions-3.0"
# https://bugs.launchpad.net/ubuntu/+source/totem/+bug/1712021
# https://bugzilla.gnome.org/show_bug.cgi?id=784236
# https://github.com/mesonbuild/meson/issues/1994
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/libraries/glib-networking/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
})
];

PKG_CONFIG_GIO_2_0_GIOMODULEDIR = "lib/gio/modules";
PKG_CONFIG_GIO_2_0_GIOMODULEDIR = "${placeholder "out"}/lib/gio/modules";

postPatch = ''
chmod +x meson_post_install.py # patchShebangs requires executable file
Expand Down
6 changes: 3 additions & 3 deletions pkgs/development/libraries/gvfs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ stdenv.mkDerivation rec {

# Uncomment when switching back to meson
# mesonFlags = [
# "-Dgio_module_dir=lib/gio/modules"
# "-Dsystemduserunitdir=lib/systemd/user"
# "-Ddbus_service_dir=share/dbus-1/services"
# "-Dgio_module_dir=${placeholder "out"}/lib/gio/modules"
# "-Dsystemduserunitdir=${placeholder "out"}/lib/systemd/user"
# "-Ddbus_service_dir=${placeholder "out"}/share/dbus-1/services"
# "-Dtmpfilesdir=no"
# ] ++ stdenv.lib.optionals (!gnomeSupport) [
# "-Dgcr=false" "-Dgoa=false" "-Dkeyring=false" "-Dhttp=false"
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/libraries/libwnck/3.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ in stdenv.mkDerivation rec{
nativeBuildInputs = [ pkgconfig intltool gobjectIntrospection ];
propagatedBuildInputs = [ libX11 gtk3 ];

PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_GIRDIR = "$(dev)/share/gir-1.0";
PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_TYPELIBDIR = "$(out)/lib/girepository-1.0";
PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_GIRDIR = "${placeholder "dev"}/share/gir-1.0";
PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_TYPELIBDIR = "${placeholder "out"}/lib/girepository-1.0";

passthru = {
updateScript = gnome3.updateScript {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/libraries/pipewire/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ in stdenv.mkDerivation rec {
"-Denable_gstreamer=true"
];

PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "lib/systemd/user";
PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "${placeholder "out"}/lib/systemd/user";

FONTCONFIG_FILE = fontsConf; # Fontconfig error: Cannot load default config file

Expand Down
6 changes: 2 additions & 4 deletions pkgs/development/libraries/science/math/sympow/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,11 @@ stdenv.mkDerivation rec {
makeWrapper "$out/share/sympow/sympow" "$out/bin/sympow" \
--run 'export SYMPOW_LOCAL="$HOME/.local/share/sympow"' \
--run 'if [ ! -d "$SYMPOW_LOCAL" ]; then
mkdir -p "$SYMPOW_LOCAL"
cp -r @out@/share/sympow/* "$SYMPOW_LOCAL"
mkdir -p "$SYMPOW_LOCAL"
cp -r ${placeholder "out"}/share/sympow/* "$SYMPOW_LOCAL"
chmod -R +xw "$SYMPOW_LOCAL"
fi' \
--run 'cd "$SYMPOW_LOCAL"'
substituteInPlace $out/bin/sympow --subst-var out
runHook postInstall
'';

Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/libraries/spice-gtk/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ in stdenv.mkDerivation rec {

nativeBuildInputs = [ pkgconfig gettext libsoup autoreconfHook vala gobjectIntrospection ];

PKG_CONFIG_POLKIT_GOBJECT_1_POLICYDIR = "$(out)/share/polkit-1/actions";
PKG_CONFIG_POLKIT_GOBJECT_1_POLICYDIR = "${placeholder "out"}/share/polkit-1/actions";

configureFlags = [
"--with-gtk3"
Expand Down
4 changes: 2 additions & 2 deletions pkgs/os-specific/linux/dbus-broker/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ stdenv.mkDerivation rec {

buildInputs = [ dbus glib linuxHeaders systemd ];

PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMUNITDIR = "lib/systemd/system";
PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "lib/systemd/user";
PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMUNITDIR = "${placeholder "out"}/lib/systemd/system";
PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "${placeholder "out"}/lib/systemd/user";

postInstall = ''
install -Dm644 ../README $out/share/doc/dbus-broker/README
Expand Down
2 changes: 1 addition & 1 deletion pkgs/os-specific/linux/selinux-sandbox/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
substituteInPlace Makefile --replace "-m 4755" "-m 755"
substituteInPlace sandboxX.sh \
--replace "#!/bin/sh" "#!${bash}/bin/sh" \
--replace "/usr/share/sandbox/start" "$out/share/sandbox/start" \
--replace "/usr/share/sandbox/start" "${placeholder "out"}/share/sandbox/start" \
--replace "/usr/bin/cut" "${coreutils}/bin/cut" \
--replace "/usr/bin/Xephyr" "${xorgserver}/bin/Xepyhr" \
--replace "secon" "${policycoreutils}/bin/secon"
Expand Down
6 changes: 1 addition & 5 deletions pkgs/tools/graphics/gmic/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,12 @@ in stdenv.mkDerivation rec {
"-DBUILD_LIB_STATIC=OFF"
"-DBUILD_PLUGIN=${if withGimpPlugin then "ON" else "OFF"}"
"-DENABLE_DYNAMIC_LINKING=ON"
];
] ++ stdenv.lib.optional withGimpPlugin "-DPLUGIN_INSTALL_PREFIX=${placeholder "gimpPlugin"}/${gimp.targetPluginDir}";

postPatch = ''
cp ${CMakeLists} CMakeLists.txt
'';

preConfigure = stdenv.lib.optionalString withGimpPlugin ''
cmakeFlags="$cmakeFlags -DPLUGIN_INSTALL_PREFIX=$gimpPlugin/${gimp.targetPluginDir}"
'';

meta = with stdenv.lib; {
description = "G'MIC is an open and full-featured framework for image processing";
homepage = http://gmic.eu/;
Expand Down
10 changes: 5 additions & 5 deletions pkgs/tools/misc/colord/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ stdenv.mkDerivation rec {
glib-compile-schemas $out/share/glib-2.0/schemas
'';

PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMUNITDIR = "lib/systemd/system";
PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "lib/systemd/user";
PKG_CONFIG_SYSTEMD_TMPFILESDIR = "lib/tmpfiles.d";
PKG_CONFIG_BASH_COMPLETION_COMPLETIONSDIR= "share/bash-completion/completions";
PKG_CONFIG_UDEV_UDEVDIR = "lib/udev";
PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMUNITDIR = "${placeholder "out"}/lib/systemd/system";
PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "${placeholder "out"}/lib/systemd/user";
PKG_CONFIG_SYSTEMD_TMPFILESDIR = "${placeholder "out"}/lib/tmpfiles.d";
PKG_CONFIG_BASH_COMPLETION_COMPLETIONSDIR= "${placeholder "out"}/share/bash-completion/completions";
PKG_CONFIG_UDEV_UDEVDIR = "${placeholder "out"}/lib/udev";

postFixup = ''
wrapProgram "$out/libexec/colord-session" \
Expand Down

0 comments on commit 4caab41

Please sign in to comment.