Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libconfig: fix static windows build #120973

Merged
merged 1 commit into from
Dec 4, 2022
Merged

libconfig: fix static windows build #120973

merged 1 commit into from
Dec 4, 2022

Conversation

Radvendii
Copy link
Contributor

Motivation for this change

when building statically for windows, libconfig tests fail to build. This disables them in that situation.

I feel like this is a lot of tweaking for an edge case, and it seems ugly and hard to follow sprinkled throughout the derivation. Is there a canonical way to change a bunch of stuff based on one conditional all in once place? I can imagine using something like

(stdenv.mkDerivation rec {
  ...
}).overrideAttrs (old: 
lib.optionalAttrs (stdenv.hostPlatform.isWindows && stdenv.hostPlatform.isStatic) {
  doCheck = false;
  ...
}

But I've never seen such a thing in a derivation before, so I don't know.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@r-rmcgibbo
Copy link

r-rmcgibbo commented Apr 28, 2021

Result of nixpkgs-review pr 120973 at a204e5fe run on aarch64-linux 1

4 packages marked as broken and skipped:
  • giada
  • pulseeffects-legacy
  • pulseeffects-pw
  • sonic-pi
4 packages skipped due to time constraints:
  • audiality2
  • koboredux
  • koboredux-free
  • lsp-plugins
45 packages built successfully:
  • ahoviewer
  • aj-snapshot
  • carla
  • clight
  • faust2jack
  • faust2jaqt
  • ffado (libffado)
  • jack1
  • jack2
  • jackmix_jack1
  • libconfig
  • libguestfs
  • libtoxcore (libtoxcore_0_2)
  • libtoxcore-new
  • libtoxcore_0_1
  • odp-dpdk (linuxPackages.odp-dpdk)
  • littlegptracker
  • ltc-tools
  • luppp
  • lxqt.compton-conf
  • mar1d
  • neocomp
  • nntp-proxy
  • octavePackages.audio
  • picom
  • python38Packages.guestfs
  • python39Packages.guestfs
  • qradiolink
  • qtox
  • ratox
  • shairport-sync
  • shotcut
  • soundtracker
  • sslh
  • tetraproc
  • toxic
  • toxprpl
  • toxvpn
  • umurmur
  • utox
  • vagrant
  • webcamoid
  • xob
  • yabar
  • yabar-unstable
1 suggestion:
  • warning: unclear-gpl

    lgpl3 is a deprecated license, please check if project uses lgpl3Plus or lgpl3Only and change meta.license accordingly.

    Near pkgs/development/libraries/libconfig/default.nix:34:5:

       |
    34 |     license = licenses.lgpl3;
       |     ^
    

Result of nixpkgs-review pr 120973 at a204e5fe run on x86_64-linux 1

3 packages marked as broken and skipped:
  • fileshelter
  • ofp
  • webbrowser
14 packages skipped due to time constraints:
  • carla
  • koboredux
  • koboredux-free
  • odp-dpdk (linuxPackages.odp-dpdk)
  • magnetophonDSP.CompBus
  • magnetophonDSP.VoiceOfFaust
  • magnetophonDSP.faustCompressors
  • pulseeffects-legacy
  • pulseeffects-pw
  • qtox
  • ...
53 packages built successfully:
  • ahoviewer
  • aj-snapshot
  • audiality2
  • clight
  • faust2jack
  • faust2jaqt
  • ffado (libffado)
  • giada
  • jack1
  • jack2
  • jackmix_jack1
  • libconfig
  • libguestfs
  • libtoxcore (libtoxcore_0_2)
  • libtoxcore-new
  • libtoxcore_0_1
  • littlegptracker
  • lsp-plugins
  • ltc-tools
  • luppp
  • lxqt.compton-conf
  • magnetophonDSP.CharacterCompressor
  • magnetophonDSP.ConstantDetuneChorus
  • magnetophonDSP.LazyLimiter
  • magnetophonDSP.MBdistortion
  • magnetophonDSP.RhythmDelay
  • magnetophonDSP.pluginUtils
  • magnetophonDSP.shelfMultiBand
  • mar1d
  • mooSpace
  • neocomp
  • nntp-proxy
  • octavePackages.audio
  • picom
  • python38Packages.guestfs
  • python39Packages.guestfs
  • qradiolink
  • ratox
  • shairport-sync
  • soundtracker
  • sslh
  • tambura
  • tetraproc
  • toxic
  • toxprpl
  • toxvpn
  • tuxguitar
  • umurmur
  • utox
  • vagrant
  • xob
  • yabar
  • yabar-unstable
1 suggestion:
  • warning: unclear-gpl

    lgpl3 is a deprecated license, please check if project uses lgpl3Plus or lgpl3Only and change meta.license accordingly.

    Near pkgs/development/libraries/libconfig/default.nix:34:5:

       |
    34 |     license = licenses.lgpl3;
       |     ^
    

@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Apr 30, 2021

Usually we override an input if we want to disable a testing.

@Radvendii
Copy link
Contributor Author

So, like adding an input doCheck ? with stdenv.hostPlatform; isWindows && isStatic and then just having inherit doCheck; in the derivation? Or should the input be called something else like buildTests, since it's not just controlling the doCheck variable?

@Radvendii
Copy link
Contributor Author

I changed it to take in a doCheck argument. let me know if this isn't what you meant

@stale
Copy link

stale bot commented Oct 30, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Oct 30, 2021
@Radvendii
Copy link
Contributor Author

This is still ready to merge I think.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Oct 31, 2021
@SuperSandro2000
Copy link
Member

@Radvendii merge conflict

@Radvendii
Copy link
Contributor Author

Fixed. It's actually a simpler change now, since my upstream patch has been accepted, and the nixpkgs version has been bumped

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 19, 2022
@Mic92 Mic92 merged commit 0604713 into NixOS:master Dec 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 10.rebuild-darwin: 11-100 10.rebuild-linux: 101-500
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants