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

Added micronucleus #76621

Merged
merged 3 commits into from Jan 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions maintainers/maintainer-list.nix
Expand Up @@ -1075,6 +1075,21 @@
githubId = 510553;
name = "Jos van Bakel";
};
cab404 = {
email = "cab404@mailbox.org";
github = "cab404";
githubId = 6453661;
name = "Vladimir Serov";
keys = [
cab404 marked this conversation as resolved.
Show resolved Hide resolved
# compare with https://keybase.io/cab404
{ longkeyid = "1BB96810926F4E715DEF567E6BA7C26C3FDF7BB3";
fingerprint = "rsa3072/0xCBDECF658C38079E";
}
{ longkeyid = "1EBC648C64D6045463013B3EB7EFFC271D55DB8A";
fingerprint = "ed25519/0xB7EFFC271D55DB8A";
}
];
};
calbrecht = {
email = "christian.albrecht@mayflower.de";
github = "calbrecht";
Expand Down
38 changes: 38 additions & 0 deletions pkgs/development/tools/misc/micronucleus/default.nix
@@ -0,0 +1,38 @@
{
pkgs
, stdenv
, libusb
, fetchFromGitHub
, lib
}:
stdenv.mkDerivation rec {
pname = "micronucleus";
version = "2.04";

sourceRoot = "source/commandline";

src = fetchFromGitHub {
owner = "micronucleus";
repo = "micronucleus";
rev = version;
sha256 = "14msy9amlbflw5mqrbs57b7bby3nsgx43srr7215zyhfdgsla0in";
};

buildInputs = [ libusb ];
makeFlags = stdenv.lib.optionals stdenv.isDarwin [ "CC=cc" ];

installPhase = ''
mkdir -p $out/bin
mkdir -p $out/lib/udev
cp micronucleus $out/bin
cp 49-micronucleus.rules $out/lib/udev
Copy link
Contributor

Choose a reason for hiding this comment

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

Future work, not needed for this PR:

You might want to PR a makefile change upstream, which updates their install taget to use DESTDIR and installs the udev rule too.

We'd then only need to set makeFlags = [ "DESTDIR=$(out)" ];, and could drop the custom installPhase alltogether for the next release.

'';

meta = with lib; {
description = "Upload tool for micronucleus";
homepage = "https://github.com/micronucleus/micronucleus";
license = licenses.gpl3;
maintainers = [ maintainers.cab404 ];
};

}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -13219,6 +13219,8 @@ in

microsoft_gsl = callPackage ../development/libraries/microsoft_gsl { };

micronucleus = callPackage ../development/tools/misc/micronucleus { };

mimalloc = callPackage ../development/libraries/mimalloc { };

minizip = callPackage ../development/libraries/minizip { };
Expand Down