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

disk_indicator: 2014-05-19 -> 2018-12-18 #65230

Closed
wants to merge 1 commit into from

Conversation

cyplo
Copy link
Contributor

@cyplo cyplo commented Jul 21, 2019

Motivation for this change

Hi ! I needed the newer disk_indicator, so I've updated the one available.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@@ -1,22 +1,24 @@
{ stdenv, fetchgit, libX11 }:

stdenv.mkDerivation {
name = "disk-indicator-2014-05-19";
name = "disk-indicator-2018-12-18";
Copy link
Member

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 {
Copy link
Member

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 "
Copy link
Member

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"
Copy link
Member

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
'';
Copy link
Member

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";
Copy link
Member

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";
Copy link
Member

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" ];

@peterhoeg
Copy link
Member

@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.

@cyplo
Copy link
Contributor Author

cyplo commented Jul 22, 2019

Heya @peterhoeg - thanks so much for the review, this helps a lot :) Will fix and ping you again, have a great day :)

@mmahut
Copy link
Member

mmahut commented Aug 12, 2019

welcome @cyplo :) let us know if you need any help moving this PR forward!

@cyplo
Copy link
Contributor Author

cyplo commented Aug 13, 2019

Thank you :) I just honestly am swamped right now with other work and been putting this off.
If anyone wants to pick this up - feel free. Also - if anyone wants to pair program on this, via a call or something - please let me know :)

@stale
Copy link

stale bot commented Jun 1, 2020

Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the
    related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on
    irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 1, 2020
@peterhoeg
Copy link
Member

We still carry the old version. No idea if anybody is using this though.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 8, 2020
@cyplo
Copy link
Contributor Author

cyplo commented Jun 15, 2020

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants