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

Package for the nix packaging system #574

Open
v1kko opened this issue Mar 20, 2024 · 2 comments
Open

Package for the nix packaging system #574

v1kko opened this issue Mar 20, 2024 · 2 comments

Comments

@v1kko
Copy link

v1kko commented Mar 20, 2024

I created a package such that I can work with oidc-agent on my system. please see the derivation below. I hope it is useful for others that wish to install it on a nix system.

{ lib, stdenv, fetchFromGitHub, curl, webkitgtk, libmicrohttpd, libsecret, qrencode, libsodium, pkg-config, help2man }:

stdenv.mkDerivation rec {
  pname = "oidc-agent";
  version = "5.1.0";

  src = fetchFromGitHub {
    owner = "indigo-dc";
    repo = "${pname}";
    rev = "v${version}";
    sha256 = "sha256-cOK/rZ/jnyALLuhDM3+qvwwe4Fjkv8diQBkw7NfVo0c="
    ;
  };

  buildInputs = [
    pkg-config
    help2man
  ];
  nativeBuildInputs = [
    curl
    webkitgtk
    libmicrohttpd
    libsecret
    qrencode
    libsodium
  ];

  installPhase = ''
    make install_bin PREFIX=$out BIN_PATH=$out
    make install_lib PREFIX=$out LIB_PATH=$out/lib
    make install_conf install_bash install_scheme_handler install_xsession_script PREFIX=$out
  '';
  postFixup = ''
    cp -r $out/bin/* bin
    make install_man PREFIX=$out
  '';


  meta = with lib; {
    description = "oidc-agent for managing OpenID Connect tokens on the command line";
    homepage = "https://github.com/indigo-dc/oidc-agent";
    maintainers = [ ];
    license = licenses.mit;
  };
}
@marcvs
Copy link
Collaborator

marcvs commented Mar 22, 2024

Cool, thanks; I'll keep this open until I get to packaging again.

Could you recommend me a docker image to use with building nix packages?

@v1kko
Copy link
Author

v1kko commented Mar 26, 2024

I will look into setting up a pipeline for this (also out of my own interest).

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

2 participants