oidc-agent
oidc-agent copied to clipboard
Package for the nix packaging system
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;
};
}
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?
I will look into setting up a pipeline for this (also out of my own interest).
Would it be possible to consider adding this to nixpkgs? I noticed that there are users requesting oidc-agent on the forum (https://discourse.nixos.org/t/managing-openid-connect-tokens/24743). Additionally, we could include a NixOS module to make usage easier.
It seems that this has been added to nixpkgs, so I guess we can close this. Thanks to @xinyangli and @v1kko