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
disk_indicator: 2014-05-19 -> 2018-12-18 #65230
Conversation
@@ -1,22 +1,24 @@ | |||
{ stdenv, fetchgit, libX11 }: | |||
|
|||
stdenv.mkDerivation { | |||
name = "disk-indicator-2014-05-19"; | |||
name = "disk-indicator-2018-12-18"; |
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.
name -> pname without the version
@@ -1,22 +1,24 @@ | |||
{ stdenv, fetchgit, libX11 }: | |||
|
|||
stdenv.mkDerivation { | |||
name = "disk-indicator-2014-05-19"; | |||
name = "disk-indicator-2018-12-18"; | |||
|
|||
src = fetchgit { |
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.
use fetchFromGitHub
instead of fetchgit
.
substituteInPlace ./makefile --replace "COMPILER=c99" "COMPILER=gcc -std=c99" | ||
substituteInPlace ./makefile --replace "COMPILE_FLAGS=" "COMPILE_FLAGS=-O2 " | ||
substituteInPlace ./Makefile --replace "COMPILER=c99" "COMPILER=gcc -std=c99" | ||
substituteInPlace ./Makefile --replace "COMPILE_FLAGS=" "COMPILE_FLAGS=-O2 " |
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.
You can pass multiple parameters to substituteInPlace:
substituteInPlace ./Makefile \
--replace "COMPILER=c99" "COMPILER=gcc -std=c99" \
--replace "COMPILE_FLAGS=" "COMPILE_FLAGS=-O2 "
}; | ||
|
||
buildInputs = [ libX11 ]; | ||
|
||
patchPhase = '' | ||
substituteInPlace ./makefile --replace "COMPILER=c99" "COMPILER=gcc -std=c99" |
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.
runHook prePatch
substituteInPlace ./makefile --replace "COMPILE_FLAGS=" "COMPILE_FLAGS=-O2 " | ||
substituteInPlace ./Makefile --replace "COMPILER=c99" "COMPILER=gcc -std=c99" | ||
substituteInPlace ./Makefile --replace "COMPILE_FLAGS=" "COMPILE_FLAGS=-O2 " | ||
patchShebangs ./configure.sh | ||
''; |
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.
runHook postPatch
''; | ||
|
||
buildPhase = "make -f makefile"; | ||
configurePhase = "./configure.sh --all"; | ||
buildPhase = "make -f Makefile"; |
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.
Redundant. make
will by default look for a Makefile
.
''; | ||
|
||
buildPhase = "make -f makefile"; | ||
configurePhase = "./configure.sh --all"; |
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.
Don't override the whole phase. You can do:
configureScript = "configure.sh";
configureFlags = [ "--all" ];
@cyplo, I just realized that this is your first PR, so I would also like to welcome you to our community and thank you for your contribution. |
Heya @peterhoeg - thanks so much for the review, this helps a lot :) Will fix and ping you again, have a great day :) |
welcome @cyplo :) let us know if you need any help moving this PR forward! |
Thank you :) I just honestly am swamped right now with other work and been putting this off. |
Thank you for your contributions.
|
We still carry the old version. No idea if anybody is using this though. |
I don't need this one anymore tbh - do we have any stats on most recent downloads from cache or something we could use to assess @peterhoeg ? |
Motivation for this change
Hi ! I needed the newer
disk_indicator
, so I've updated the one available.Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)