@Akhilesh Singh Bhadauriya wants to nixify https://github.com/piyushKumar-1/haskell_cac_client
This is basically a Haskell library with FFI bindings to Rust code in the same repo.
I have worked on a similar project two years ago: https://github.com/ArdanaLabs/yubihsm-ed-sign
But now I'd like to use this opportunity to create a template repo for such projects, using haskell-flake
and something for Rust.
I tried to move this repo to nammayatri(https://github.com/nammayatri/nammayatri) so I'm getting this following error:
… while calling the 'derivationStrict' builtin
at /builtin/derivation.nix:9:12: (source not available)
… while evaluating derivation 'ny-backend'
whose name attribute is located at /nix/store/aiv6rdld7d7smj3rrh72da2sssl6z2xl-source/pkgs/stdenv/generic/make-derivation.nix:300:7
… while evaluating attribute '__impureHostDeps' of derivation 'ny-backend'
at /nix/store/aiv6rdld7d7smj3rrh72da2sssl6z2xl-source/pkgs/stdenv/generic/make-derivation.nix:435:7:
434| __propagatedSandboxProfile = lib.unique (computedPropagatedSandboxProfile ++ [ propagatedSandboxProfile ]);
435| __impureHostDeps = computedImpureHostDeps ++ computedPropagatedImpureHostDeps ++ __propagatedImpureHostDeps ++ __impureHostDeps ++ stdenv.__extraImpureHostDeps ++ [
| ^
436| "/dev/zero"
(stack trace truncated; use '--show-trace' to show the full trace)
error: function 'anonymous lambda' called without required argument 'cac_client'
at /nix/store/l8awdgyzg1zanisz6xb492r6ybzzrnfc-cabal2nix-haskell-cac/default.nix:1:1:
1| { mkDerivation, base, cac_client, lib }:
| ^
2| mkDerivation {
realpath: /Users/akhilesh.b/Desktop/nammayatri/.direnv/flake-profile.55906: No such file or directory
error: path '/Users/akhilesh.b/Desktop/nammayatri' is not in the Nix store
warning: Git tree '/Users/akhilesh.b/Desktop/nammayatri' is dirty
direnv: nix-direnv: renewed cache
direnv: export +XDG_DATA_DIRS ~PATH
Is this expected.
@Akhilesh Singh Bhadauriya What is the diff, exactly?
error: path '/Users/akhilesh.b/Desktop/nammayatri' is not in the Nix store
Your Nix seems to be referring to some absolute path.
You can put post the link to the branch on GitHub
No but i'm trying to compile everything in local. This is just showing the path where my nammayatri repo is.
It would be nice to see the code committed somewhere so that we can reproduce the issue
You can find this here
https://github.com/nammayatri/nammayatri/tree/Backend/FFI-RUst/issue
You should not commit compiled assets like the target
folder @Akhilesh Singh Bhadauriya
@Akhilesh Singh Bhadauriya The CI is not showing the error you report. Instead it is showing something else:
error: function 'anonymous lambda' called without required argument 'cac_client'
Which is understandable as we haven't written any Nix to a) build the Rust package, and b) make it available to the Haskell packages. Which is exactly what I plan to do next week.
Nixified version of repo PR:
https://github.com/piyushKumar-1/haskell_cac_client/pull/2
Last updated: Nov 15 2024 at 11:45 UTC