Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: edd58cf4a7b3
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a96fbaac8c13
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Apr 17, 2020

  1. st: copy config file in 'prePatch' instead of 'preBuild'

    The patch phase runs after the build phase. Which means than when
    using an override to override both 'conf' and 'patches' to provide
    a custom config file and apply some patches, it doesn't work:
    - first the patches applied (optionally changing config.def.h)
    - then preBuild is run which overrides config.def.h with the user
    supplied one (effectively cancelling previously applied patches)
    
    By copying the config file in the prePatch phase instead, changes
    are kept and applied in order.
    
    (cherry picked from commit b584941)
    nschoe authored and Mic92 committed Apr 17, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    prusnak Pavol Rusnak
    Copy the full SHA
    a96fbaa View commit details
Showing with 3 additions and 2 deletions.
  1. +3 −2 pkgs/applications/misc/st/default.nix
5 changes: 3 additions & 2 deletions pkgs/applications/misc/st/default.nix
Original file line number Diff line number Diff line change
@@ -13,8 +13,9 @@ stdenv.mkDerivation rec {

inherit patches;

configFile = optionalString (conf!=null) (writeText "config.def.h" conf);
preBuild = optionalString (conf!=null) "cp ${configFile} config.def.h";
prePatch = optionalString (conf != null) ''
cp ${writeText "config.def.h" conf} config.def.h
'';

nativeBuildInputs = [ pkgconfig ncurses ];
buildInputs = [ libX11 libXft ] ++ extraLibs;