-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add nix derivation #45
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,3 +31,5 @@ src/tools/idb_extract | |
src/tools/jffs2extract | ||
src/tools/lzhs_scanner | ||
src/tools/lzhsenc | ||
|
||
result | ||
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,33 @@ | ||||||||||||||||||
{ pkgs ? import <nixpkgs> {} }: | ||||||||||||||||||
|
||||||||||||||||||
pkgs.stdenv.mkDerivation rec { | ||||||||||||||||||
pname = "epk2extract"; | ||||||||||||||||||
version = "devel"; | ||||||||||||||||||
Comment on lines
+4
to
+5
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we don't have an explicit version here, it's probably better to just use
Suggested change
|
||||||||||||||||||
|
||||||||||||||||||
src = ./.; | ||||||||||||||||||
|
||||||||||||||||||
buildInputs = [ | ||||||||||||||||||
pkgs.cmake | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs to be in |
||||||||||||||||||
pkgs.openssl.dev | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need to specify |
||||||||||||||||||
pkgs.lzo | ||||||||||||||||||
pkgs.zlib | ||||||||||||||||||
]; | ||||||||||||||||||
|
||||||||||||||||||
configurePhase = '' | ||||||||||||||||||
cmake . | ||||||||||||||||||
''; | ||||||||||||||||||
|
||||||||||||||||||
buildPhase = '' | ||||||||||||||||||
make | ||||||||||||||||||
''; | ||||||||||||||||||
Comment on lines
+15
to
+22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
If you place |
||||||||||||||||||
|
||||||||||||||||||
installPhase = '' | ||||||||||||||||||
mkdir -p $out/bin | ||||||||||||||||||
cd src | ||||||||||||||||||
cp epk2extract tools/lzhsenc tools/lzhs_scanner tools/idb_extract tools/jffs2extract $out/bin | ||||||||||||||||||
Comment on lines
+25
to
+27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know it's probably personal taste, but what about the following (which does not change the current working directory):
Suggested change
|
||||||||||||||||||
|
||||||||||||||||||
chmod -x ../keys/* | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's the upstream project, so no need to fix up something like this. |
||||||||||||||||||
cp ../keys/*.key ../keys/*.pem $out/bin | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is pretty ugly IMO and those files ideally should be in |
||||||||||||||||||
''; | ||||||||||||||||||
} | ||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small nitpick: