-
Notifications
You must be signed in to change notification settings - Fork 1
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
not working under nix #10
Comments
Nice to meet you! Thank you for your report and I'm sorry for your trouble. I was not aware of the The error message indicates that the C macro
FYI, the value of EDIT: I confused |
The Cabal file you distribute advertises the build of this package as |
It's specified as |
Oh, okay. Sorry, I was confused by the message that said running |
I was wrong 🤦 I meant |
It looks like
This works, however I don't like the version number being duplicated. Another approach I was trying was to change the
but then it complains with the message:
... which I could fix by storing @peti, I am kindly ask you for your advice again. How to fix the nix-build problem properly in this case? The tests still fail however, so the nix build is not successfull unless I disable the tests. But this is unrelated problem. |
Hello! I'm not a nix user myself but I'm interested in trying to figure this out too (as the error is identical to my stack building failure issue). I decided to install nix a few hours ago and I came to a similar obstacle as well. However, I found there's a Nix's feature that allows you to run autoreconf at build time. Anyways, I managed to build the package from the source using Setup.hs import Distribution.Simple
main = defaultMainWithHooks autoconfUserHooks shell.nix { nixpkgs ? import <nixpkgs> {}, compiler ? "default", doBenchmark ? false }:
let
inherit (nixpkgs) pkgs;
f = { autoreconfHook, pkg-config, mkDerivation, base, bytestring, clock
, criterion, directory, filepath, fuse3, hspec, lib, process, resourcet
, temporary, time, unix
}:
mkDerivation {
pname = "libfuse3";
version = "0.1.2.0";
src = ./.;
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
base bytestring clock resourcet time unix
];
libraryPkgconfigDepends = [ fuse3 ];
testHaskellDepends = [
base bytestring directory filepath hspec process temporary unix
];
benchmarkHaskellDepends = [ base bytestring criterion unix ];
description = "A Haskell binding for libfuse-3.x";
license = lib.licenses.mit;
};
haskellPackages = if compiler == "default"
then pkgs.haskellPackages
else pkgs.haskell.packages.${compiler};
variant = if doBenchmark then pkgs.haskell.lib.doBenchmark else pkgs.lib.id;
drv = variant (haskellPackages.callPackage f {});
in
#if pkgs.lib.inNixShell then drv.env else drv
drv.overrideAttrs (attrs: {
nativeBuildInputs = [ pkgs.autoreconfHook pkgs.pkg-config ];
}) The test failure still persists however as mentioned, and I'm not sure if this workaround is an ideal solution to the problem, but it's there if anyone else wanna try building it. |
This package is marked broken in
nixpkgs
. I have tried to troubleshoot the problem, but I am not sure what to do. It looks like the package is not properly integrated with nix. There is an extra step required during build (as explained in README), that isautoreconf -fiv
. Not sure, but maybe this required step is not performed during automatic nix build process.Pinging @peti for an idea, what to do in this case.
So, this works:
But this does not work:
It fails with the following error:
The text was updated successfully, but these errors were encountered: