Skip to content

loadlibrary: init at 2551be #26074

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

Merged
merged 1 commit into from
May 24, 2017
Merged

Conversation

proteansec
Copy link
Contributor

Motivation for this change

Addition of loadlibrary to nixpkgs.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Sorry, something went wrong.

@proteansec proteansec changed the title Pkgs/loadlibrary loadlibrary: init at f29645 May 24, 2017
@proteansec proteansec changed the title loadlibrary: init at f29645 loadlibrary: init at 2551be May 24, 2017
{ fetchurl, cabextract, glibc_multi, fetchFromGitHub, readline, stdenv_32bit }:

stdenv_32bit.mkDerivation {
name = "loadlibrary";
Copy link
Contributor

@offlinehacker offlinehacker May 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

version is missing, use something like this:

  name = "loadlibrary-${version}";
  version = "20170525-${lib.strings.substring 0 7 rev}";
  rev = "ca6dce8719d4fd0d347c218cb844275518261bf1";

  src = fetchFromGitHub {
     inherit rev;
     owner = "taviso";
     repo = "loadlibrary";
     sha256 = "01hb7wzfh1s5b8cvmrmr1gqknpq5zpzj9prq3wrpsgg129jpsjkb";
  };

The same we use for go packages.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Date of commit is used, so nix knows when to update package.

meta = with stdenv_32bit.lib; {
homepage = "https://github.com/taviso/loadlibrary";
description = "Porting Windows Dynamic Link Libraries to Linux";
platforms = platforms.unix;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unix means also osx, are you sure? You can also use platforms.linux.


stdenv_32bit.mkDerivation {
name = "loadlibrary";
#src = fetchurl {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleanup here

@@ -0,0 +1,30 @@
{ fetchurl, cabextract, glibc_multi, fetchFromGitHub, readline, stdenv_32bit }:

stdenv_32bit.mkDerivation {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A comment why stdenv_32bit is needed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, i ment comment in package, like

# this package requires libc6-i386

cp mpclient $out/bin/
'';

meta = with stdenv_32bit.lib; {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just as a note, lib can be imported separately.

@offlinehacker
Copy link
Contributor

Thanks! Just squash commits, and we are ready to merge :)

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
@offlinehacker offlinehacker merged commit e602537 into NixOS:master May 24, 2017
@proteansec proteansec deleted the pkgs/loadlibrary branch May 25, 2017 06:26
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

Successfully merging this pull request may close these issues.

None yet

2 participants