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

Frames fails to install via nix #172

Closed
idontgetoutmuch opened this issue Apr 29, 2023 · 4 comments · Fixed by #173
Closed

Frames fails to install via nix #172

idontgetoutmuch opened this issue Apr 29, 2023 · 4 comments · Fixed by #173

Comments

@idontgetoutmuch
Copy link

nix-shell -p "ghc.withPackages (pkgs: with pkgs; [ Frames ])"
these 3 derivations will be built:
  /nix/store/xvrb7wfnz0mwdpmlcz4w40xkc38sb4cc-htoml-1.0.0.3.drv
  /nix/store/27nc3kn5h1mb4i9hxbrxypnx1izym8zf-Frames-0.7.3.drv
  /nix/store/szxwf4lbjji9sqi3229vp059qmly395a-ghc-9.2.6-with-packages.drv
building '/nix/store/xvrb7wfnz0mwdpmlcz4w40xkc38sb4cc-htoml-1.0.0.3.drv'...
setupCompilerEnvironmentPhase
Build with /nix/store/ql6c899sdl026pvihnqplddflsrkfxwf-ghc-9.2.6.
unpacking sources
unpacking source archive /nix/store/y7hyb7fc4lp9fww6m7fjayfp03pj7lb9-htoml-1.0.0.3.tar.gz
source root is htoml-1.0.0.3
setting SOURCE_DATE_EPOCH to timestamp 1478481202 of file htoml-1.0.0.3/htoml.cabal
patching sources
Replace Cabal file with edited version from mirror://hackage/htoml-1.0.0.3/revision/1.cabal.
compileBuildDriverPhase
setupCompileFlags: -package-db=/private/tmp/nix-build-htoml-1.0.0.3.drv-0/tmp.ogKBTDRdrE/setup-package.conf.d -j10 -threaded -rtsopts
[1 of 1] Compiling Main             ( Setup.lhs, /private/tmp/nix-build-htoml-1.0.0.3.drv-0/tmp.ogKBTDRdrE/Main.o )
Linking Setup ...
updateAutotoolsGnuConfigScriptsPhase
configuring
configureFlags: --verbose --prefix=/nix/store/51pgq12gpv1wiavrb51jgx10srvsfraq-htoml-1.0.0.3 --libdir=$prefix/lib/$compiler --libsubdir=$abi/$libname --docdir=/nix/store/l5xj1np8xb1kxd3c1w7kla6sw673za0c-htoml-1.0.0.3-doc/share/doc/htoml-1.0.0.3 --with-gcc=clang --package-db=/private/tmp/nix-build-htoml-1.0.0.3.drv-0/tmp.ogKBTDRdrE/package.conf.d --ghc-options=-j10 --disable-split-objs --disable-library-profiling --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --disable-benchmarks --enable-library-vanilla --disable-library-for-ghci --ghc-options=-haddock --extra-lib-dirs=/nix/store/gzd28cjrjjc2vdqp4013yy8fyz1rp6qn-ncurses-6.4/lib --extra-lib-dirs=/nix/store/3ps9103w66rc73b8sxshpglhp1669x2s-libffi-3.4.4/lib --extra-lib-dirs=/nix/store/dd8hj9am5i3p6y11r9h54a7bz4chjx23-gmp-with-cxx-6.2.1/lib --extra-include-dirs=/nix/store/nmphpbjn8hhq7brwi9bw41m7l05i636h-libiconv-50/include --extra-lib-dirs=/nix/store/nmphpbjn8hhq7brwi9bw41m7l05i636h-libiconv-50/lib --extra-include-dirs=/nix/store/06n2400v3qpgmi8f3vn4cxjrnihrpsfa-libcxx-11.1.0-dev/include --extra-lib-dirs=/nix/store/mc8k3za3xjy4bbfqgsvxrjjlm1hfribm-libcxx-11.1.0/lib --extra-include-dirs=/nix/store/fxj1zzwz3zbaa6y4didncqhchb25prwa-libcxxabi-11.1.0-dev/include --extra-lib-dirs=/nix/store/awkb9g93ci2qy8yg5jl0zxw46f3xnvgv-libcxxabi-11.1.0/lib --extra-lib-dirs=/nix/store/yxdb2rr9yavaizhd7xm0jnr4rcam4mf6-compiler-rt-libc-11.1.0/lib --extra-lib-dirs=/nix/store/ql6c899sdl026pvihnqplddflsrkfxwf-ghc-9.2.6/lib --extra-lib-dirs=/nix/store/ylxc5aq56jqd19vmbqgpgbyjnjmw9qyd-apple-framework-CoreFoundation-11.0.0/lib --extra-framework-dirs=/nix/store/ylxc5aq56jqd19vmbqgpgbyjnjmw9qyd-apple-framework-CoreFoundation-11.0.0/Library/Frameworks --extra-include-dirs=/nix/store/aa50xm9xbf89wx9z0cd0lkiz82snqmbr-libobjc-11.0.0/include --extra-lib-dirs=/nix/store/aa50xm9xbf89wx9z0cd0lkiz82snqmbr-libobjc-11.0.0/lib
Using Parsec parser
Configuring htoml-1.0.0.3...

Setup: Encountered missing or private dependencies:
aeson >=0.8 && <2, tasty-hspec <1.2

error: builder for '/nix/store/xvrb7wfnz0mwdpmlcz4w40xkc38sb4cc-htoml-1.0.0.3.drv' failed with exit code 1;
       last 10 log lines:
       > Linking Setup ...
       > updateAutotoolsGnuConfigScriptsPhase
       > configuring
       > configureFlags: --verbose --prefix=/nix/store/51pgq12gpv1wiavrb51jgx10srvsfraq-htoml-1.0.0.3 --libdir=$prefix/lib/$compiler --libsubdir=$abi/$libname --docdir=/nix/store/l5xj1np8xb1kxd3c1w7kla6sw673za0c-htoml-1.0.0.3-doc/share/doc/htoml-1.0.0.3 --with-gcc=clang --package-db=/private/tmp/nix-build-htoml-1.0.0.3.drv-0/tmp.ogKBTDRdrE/package.conf.d --ghc-options=-j10 --disable-split-objs --disable-library-profiling --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --disable-benchmarks --enable-library-vanilla --disable-library-for-ghci --ghc-options=-haddock --extra-lib-dirs=/nix/store/gzd28cjrjjc2vdqp4013yy8fyz1rp6qn-ncurses-6.4/lib --extra-lib-dirs=/nix/store/3ps9103w66rc73b8sxshpglhp1669x2s-libffi-3.4.4/lib --extra-lib-dirs=/nix/store/dd8hj9am5i3p6y11r9h54a7bz4chjx23-gmp-with-cxx-6.2.1/lib --extra-include-dirs=/nix/store/nmphpbjn8hhq7brwi9bw41m7l05i636h-libiconv-50/include --extra-lib-dirs=/nix/store/nmphpbjn8hhq7brwi9bw41m7l05i636h-libiconv-50/lib --extra-include-dirs=/nix/store/06n2400v3qpgmi8f3vn4cxjrnihrpsfa-libcxx-11.1.0-dev/include --extra-lib-dirs=/nix/store/mc8k3za3xjy4bbfqgsvxrjjlm1hfribm-libcxx-11.1.0/lib --extra-include-dirs=/nix/store/fxj1zzwz3zbaa6y4didncqhchb25prwa-libcxxabi-11.1.0-dev/include --extra-lib-dirs=/nix/store/awkb9g93ci2qy8yg5jl0zxw46f3xnvgv-libcxxabi-11.1.0/lib --extra-lib-dirs=/nix/store/yxdb2rr9yavaizhd7xm0jnr4rcam4mf6-compiler-rt-libc-11.1.0/lib --extra-lib-dirs=/nix/store/ql6c899sdl026pvihnqplddflsrkfxwf-ghc-9.2.6/lib --extra-lib-dirs=/nix/store/ylxc5aq56jqd19vmbqgpgbyjnjmw9qyd-apple-framework-CoreFoundation-11.0.0/lib --extra-framework-dirs=/nix/store/ylxc5aq56jqd19vmbqgpgbyjnjmw9qyd-apple-framework-CoreFoundation-11.0.0/Library/Frameworks --extra-include-dirs=/nix/store/aa50xm9xbf89wx9z0cd0lkiz82snqmbr-libobjc-11.0.0/include --extra-lib-dirs=/nix/store/aa50xm9xbf89wx9z0cd0lkiz82snqmbr-libobjc-11.0.0/lib
       > Using Parsec parser
       > Configuring htoml-1.0.0.3...
       >
       > Setup: Encountered missing or private dependencies:
       > aeson >=0.8 && <2, tasty-hspec <1.2
       >
       For full logs, run 'nix log /nix/store/xvrb7wfnz0mwdpmlcz4w40xkc38sb4cc-htoml-1.0.0.3.drv'.
error: 1 dependencies of derivation '/nix/store/27nc3kn5h1mb4i9hxbrxypnx1izym8zf-Frames-0.7.3.drv' failed to build
error: 1 dependencies of derivation '/nix/store/szxwf4lbjji9sqi3229vp059qmly395a-ghc-9.2.6-with-packages.drv' failed to build
@idontgetoutmuch
Copy link
Author

OTOH this does work

let

myHaskellPackageOverlay = self: super: {
  myHaskellPackages = super.haskellPackages.override {
    overrides = hself: hsuper: rec {
      htoml = super.haskell.lib.dontCheck (hself.callCabal2nixWithOptions "htoml" (builtins.fetchGit {
        url = "https://github.com/mirokuratczyk/htoml";
        rev = "33971287445c5e2531d9605a287486dfc3cbe1da";
      }) "" { });
    };
  };
};

in

{ nixpkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/refs/tags/22.11.tar.gz")
  {
    config.allowBroken = false;
    overlays = [ myHaskellPackageOverlay ];
  }
}:

let

  pkgs = nixpkgs;

  haskellDeps = ps: with ps; [
    base Frames
  ];

in

pkgs.stdenv.mkDerivation {
  name = "Whatever";

  buildInputs = [
    pkgs.libintlOrEmpty
    (pkgs.myHaskellPackages.ghcWithPackages haskellDeps)
  ];
}

@idontgetoutmuch
Copy link
Author

Why does Frames even need this package (htoml)?

@acowley
Copy link
Owner

acowley commented Apr 29, 2023

I think it’s used in a test.

@MMesch
Copy link

MMesch commented Jun 15, 2023

As another workaround, use this nixpkgs commit: nixpkgs_frames.url = "github:nixos/nixpkgs/710fed5a2483f945b14f4a58af2cd3676b42d8c8";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants