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

nixos packaging #55

Open
lambdafu opened this issue Jan 18, 2018 · 5 comments
Open

nixos packaging #55

lambdafu opened this issue Jan 18, 2018 · 5 comments

Comments

@lambdafu
Copy link
Collaborator

See discussion here: cbd2fc5

@erictapen
Copy link

erictapen commented Jan 18, 2018

This was my first attempt, a few weeks ago:

with import <nixpkgs> { };

stdenv.mkDerivation rec {
  name = "neopg";
  version = "0.0.4";

  # Don't do that, as it doesn't fetch submodules.
  # src = pkgs.fetchFromGitHub {
  #   owner = "das-labor";
  #   repo = name;
  #   rev = "v${version}";
  #   sha256 = "1xdn91xmkzgmvz0xiph123cxh0xj2wdmbbrarxip8zblr0rvphd3";
  # };

  src = fetchgit {
    url = "https://github.com/das-labor/neopg.git";
    rev = "refs/tags/v${version}";
    sha256 = "0hhkl326ff6f76k8pwggpzmivbm13fz497nlyy6ybn5bmi9xfblm";
  };

  buildInputs = with pkgs; [ cmake sqlite botan2 boost164 curl gettext pkgconfig doxygen libusb gnutls ];

  preConfigure = ''
    cd build
    cmake .. -DCMAKE_INSTALL_PREFIX=$out
    cd ..
    echo `pwd`
  '';

  buildPhase = ''
    echo `pwd`
    make
  '';

  postInstall = ''
    mkdir -p $out/bin
    cp src/neopg $out/bin/neopg
  '';
}

I lost interest in it temporarily, but maybe it is of use for anyone.

This is just for building the package. Integration into nixpkgs needs a few more steps.

@Mic92
Copy link

Mic92 commented Jan 18, 2018

preConfigure and buildPhase actually should be not necessary, since our build hooks are doing the same, if cmake is in buildInputs.

@erictapen
Copy link

Aha, thats useful information. Thanks.

@erictapen
Copy link

I did a first attempt at NixOS/nixpkgs#37700. At first look, it seems to be right, but if you want to test it:

# Clone nixpkgs with the PR included
nix-shell --pure -p neopg -I nixpkgs=path/to/your/clone/of/nixpkgs

This drops you into a shell, with only neopg being installed.

IIRC there are no man pages to package, am I right?

@Mic92
Copy link

Mic92 commented Mar 30, 2018

neopg is now available in nixpkgs. This issue can be merged.

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

3 participants