diamondburned / gtkcord3

A Gtk3 Discord client in Golang
GNU General Public License v3.0
628 stars 28 forks source link

Build fails on NixOS with "infinite recursion encountered" #68

Closed xhmn closed 4 years ago

xhmn commented 4 years ago

Environment

NixOS-unstable

To reproduce

$ git clone https://github.com/diamondburned/gtkcord3.git
$ cd gtkcord3
$ nix-build --show-trace
error: while evaluating the attribute 'buildInputs' of the derivation 'gtkcord3' at /home/xhmn/gtkcord3/derivation.nix:6:9:
while evaluating the attribute 'propagatedBuildInputs' of the derivation 'gtk+3-3.24.20-x86_64-unknown-linux-musl' at /nix/store/17z8x5nlmzwhaivnb0dm7rizla1dysm1-nixpkgs-20.09pre229671.9d0c3ffe678/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:198:11:
while evaluating the attribute 'propagatedBuildInputs' of the derivation 'at-spi2-atk-2.34.2-x86_64-unknown-linux-musl' at /nix/store/17z8x5nlmzwhaivnb0dm7rizla1dysm1-nixpkgs-20.09pre229671.9d0c3ffe678/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:198:11:
while evaluating the attribute 'postFixup' of the derivation 'at-spi2-core-2.36.0-x86_64-unknown-linux-musl' at /nix/store/17z8x5nlmzwhaivnb0dm7rizla1dysm1-nixpkgs-20.09pre229671.9d0c3ffe678/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:198:11:
while evaluating the attribute 'propagatedBuildInputs' of the derivation 'dconf-0.36.0-x86_64-unknown-linux-musl' at /nix/store/17z8x5nlmzwhaivnb0dm7rizla1dysm1-nixpkgs-20.09pre229671.9d0c3ffe678/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:198:11:
while evaluating the attribute 'propagatedBuildInputs' of the derivation 'dbus-1.12.16-x86_64-unknown-linux-musl' at /nix/store/17z8x5nlmzwhaivnb0dm7rizla1dysm1-nixpkgs-20.09pre229671.9d0c3ffe678/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:198:11:
while evaluating the attribute 'propagatedBuildInputs' of the derivation 'libX11-1.6.8-x86_64-unknown-linux-musl' at /nix/store/17z8x5nlmzwhaivnb0dm7rizla1dysm1-nixpkgs-20.09pre229671.9d0c3ffe678/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:198:11:
while evaluating the attribute 'propagatedBuildInputs' of the derivation 'xorgproto-2019.1-x86_64-unknown-linux-musl' at /nix/store/17z8x5nlmzwhaivnb0dm7rizla1dysm1-nixpkgs-20.09pre229671.9d0c3ffe678/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:198:11:
while evaluating the attribute 'propagatedBuildInputs' of the derivation 'libXt-1.2.0-x86_64-unknown-linux-musl' at /nix/store/17z8x5nlmzwhaivnb0dm7rizla1dysm1-nixpkgs-20.09pre229671.9d0c3ffe678/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:198:11:
while evaluating the attribute 'propagatedBuildInputs' of the derivation 'libSM-1.2.3-x86_64-unknown-linux-musl' at /nix/store/17z8x5nlmzwhaivnb0dm7rizla1dysm1-nixpkgs-20.09pre229671.9d0c3ffe678/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:198:11:
while evaluating the attribute 'propagatedBuildInputs' of the derivation 'libICE-1.0.10-x86_64-unknown-linux-musl' at /nix/store/17z8x5nlmzwhaivnb0dm7rizla1dysm1-nixpkgs-20.09pre229671.9d0c3ffe678/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:198:11:
infinite recursion encountered, at undefined position

Fix

In derivation.nix, change the reference to pkgsStatic to pkgs. We also got a sha256 mismatch, which was trivial to fix.

We don't know enough about linkers to know what side effects this has, if any.

diamondburned commented 4 years ago

Can you open a PR for this? These changes were just me experimenting.