Closed nomeata closed 5 years ago
nix-build -A pkgsMusl.haskell.packages.ghc843.hello https://github.com/NixOS/nixpkgs/archive/2c07921cff84dfb0b9e0f6c2d10ee2bfee6a85ac.tar.gz
I spot two things that may be wrong in there:
2c07921cff84dfb0b9e0f6c2d10ee2bfee6a85ac
is only for the minimal example mentioned in the README. You likely want to use the commit mentioned in Building arbitrary packageshaskellPackages.somePackage
attrset to build things with my overrides. I think that if you use pkgsMusl.*
you may not be using my haskellPackages
.Below is an expected output for building cachix
statically:
NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs/archive/88ae8f7d.tar.gz nix-build --no-link survey/default.nix -A haskellPackages.cachix
I have just tested on a newly set-up Ubuntu server that after cachix use static-haskell-nix
, the cache works on commit ab3c3ac47 when using NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs/archive/88ae8f7d.tar.gz nix-build --no-link survey/default.nix -A haskellPackages.cachix
:
Also take into account that only those packages are in cachix
that I uploaded there manually, not the entire nixpkgs tree. I usually upload the working
attrset and all its dependencies.
Hope this helps!
Let me know if something is still not working as expected, I'm happy to make this work smoothly.
Thanks, that helps!
I have set up the cache as indicated:
and now I would expect that building a static haskell binary using the version of
nixpkgs
indicated in the README would fetch stuff, at leastghc
itself, from the cache. But it seems it wants to build everything:Am I doing something wrong?