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

not able to install on NixOS #186

Open
turbotimon opened this issue Oct 29, 2024 · 5 comments
Open

not able to install on NixOS #186

turbotimon opened this issue Oct 29, 2024 · 5 comments

Comments

@turbotimon
Copy link

I tried all the possibilities on the README

The easiest method to try is by installing directly:

$ nix-env -i -f https://github.com/vlaci/openconnect-sso/archive/master.tar.gz
installing 'python3.11-openconnect-sso-0.8.1'
trace: warning: `pythonForBuild` (from `python*`) has been renamed to `pythonOnBuildForHost`
trace: warning: `pythonForBuild` (from `python*`) has been renamed to `pythonOnBuildForHost`

RAM gets completely full (32GB), nothing happens..

An overlay is also available to use in nix expressions:
My shell.nix looks like:

# shell.nix
let
  openconnectOverlay = import (builtins.fetchTarball "https://github.com/vlaci/openconnect-sso/archive/master.tar.gz") + "/overlay.nix";
  pkgs = import <nixpkgs> { overlays = [ openconnectOverlay ]; };
in
pkgs.mkShell {
  # Now pkgs.openconnect-sso will be available in the shell environment.
  buildInputs = [ pkgs.openconnect-sso ];
}

Same error and behaviour like above

I also tried pipx but that does not work on nix because of PyQt6 can't be installed the normal way.

Anyone can help to fix this?

NixOS Version 24.05

@jkenda
Copy link

jkenda commented Nov 17, 2024

I'm getting in the same situation with the nix-env method but with the second method I actually get a build error:

error:
       … while calling the 'derivationStrict' builtin

         at /builtin/derivation.nix:9:12: (source not available)

       … while evaluating derivation 'nix-shell'
         whose name attribute is located at /nix/store/wcfpskhg6pnwhxdyjaranxmz2h7310j8-nixos-24.05/nixos/pkgs/stdenv/generic/make-derivation.nix:333:7

       … while evaluating attribute 'buildInputs' of derivation 'nix-shell'

         at /nix/store/wcfpskhg6pnwhxdyjaranxmz2h7310j8-nixos-24.05/nixos/pkgs/stdenv/generic/make-derivation.nix:380:7:

          379|       depsHostHost                = elemAt (elemAt dependencies 1) 0;
          380|       buildInputs                 = elemAt (elemAt dependencies 1) 1;
             |       ^
          381|       depsTargetTarget            = elemAt (elemAt dependencies 2) 0;

       error: poetry2nix is now maintained out-of-tree. Please use https://github.com/nix-community/poetry2nix/

My NixOS version is also 24.05.

@arthur-d42
Copy link

You need to add the community maintained version of poetry2nix to pkgs

I added this to my inputs:

poetry2nix = {
            url = "github:nix-community/poetry2nix/2024.5.939250";
            inputs.nixpkgs.follows = "nixpkgs";
          };

And made the packages

        config = { 
          allowUnfree = true;
          packageOverrides = _: {
          poetry2nix = poetry2nix.lib.mkPoetry2Nix { inherit pkgs; };
          };
         };

Then i also had an issue where a python didn't build because it required a higher version of another - this is fixed if you get the overlay from my fork

https://github.com/arthur-d42/openconnect-sso/

@turbotimon
Copy link
Author

@arthur-d42 thanks for your message! I'm not exactly sure where to put the config = part. Do you mind share the whole shell.nix? (btw, your link does not point to the link text)

@ThinkChaos
Copy link

I didn't see this thread earlier, but you can also use my PR: #152

@turbotimon
Copy link
Author

I can also confirm this fix works on nixos. A huge thank you to ThinkChaos!!! Let's hope this get merged soon

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

No branches or pull requests

4 participants