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

chase: init at 0.5.2 #21590

Closed
wants to merge 4 commits into from
Closed

chase: init at 0.5.2 #21590

wants to merge 4 commits into from

Conversation

polyrod
Copy link
Contributor

@polyrod polyrod commented Jan 2, 2017

Motivation for this change

NixOs handles different versions of software contemporary installed on a NixOs installation.
Dispatching is done via symlinks.
"Chase" automatically resolves to the last target of a chain of symlinks avoiding looping.
I think its a valuable tool for any NixOs admin and is good company for "which".

Things done

Added chase under pkgs/tools/system/chase
Its empowers "which" that is installed in the same pkgs path

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

@@ -0,0 +1,26 @@
{ stdenv, fetchurl ,pkgconfig, libatomic_ops , boehmgc , ... }:
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use a closed parameter list (no ...)

{ stdenv, fetchurl ,pkgconfig, libatomic_ops , boehmgc , ... }:

stdenv.mkDerivation rec {
name = "chase_0.5.2.orig";
Copy link
Contributor

Choose a reason for hiding this comment

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

Please move .orig to src.url


buildInputs = [ pkgconfig libatomic_ops boehmgc ] ;
src = fetchurl {
url = "http://ftp.stw-bonn.de/debian/pool/main/c/chase/${name}.tar.gz";
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use mirror://debian

'';
homepage = "https://qa.debian.org/developer.php?login=rotty%40debian.org";
license = stdenv.lib.licenses.gpl2Plus;
maintainers = [ "Maurizio Di Pietro" ];
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add a proper entry to maintainers.

@@ -4359,6 +4359,10 @@ in

which = callPackage ../tools/system/which { };

chase = callPackage ../tools/system/chase {
inherit boehmgc;
Copy link
Contributor

Choose a reason for hiding this comment

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

callPackage is supposed to fill in all missing parameter from the enclosing scope; this explicit inherit ought to be unnecessary here.

{ stdenv, fetchurl ,pkgconfig, libatomic_ops , boehmgc }:

stdenv.mkDerivation rec {
name = "chase_0.5.2";
Copy link
Member

@LnL7 LnL7 Jan 3, 2017

Choose a reason for hiding this comment

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

The convention is to separate the version and name with a dash.
This is actually necessary to make nix-env -u work properly. http://nixos.org/nixpkgs/manual/#sec-package-naming

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The file on the debian repo seperates name and version with a "_" , so i used it .
Thank you.

Copy link
Member

@LnL7 LnL7 left a comment

Choose a reason for hiding this comment

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

nitpicks

makeFlags = [ "-e" ];
makeFlagsArray="LIBS=-lgc";

meta = {
Copy link
Member

Choose a reason for hiding this comment

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

you could use meta = with stdenv.lib; here so you don't need the full qualified attributes anymore

@grahamc
Copy link
Member

grahamc commented Jan 4, 2017

Merged in e0878ce note I collapsed your commits in to one with the text "chase: init at xxx". I also fixed the hyphen in the name. Thank you!

@grahamc grahamc closed this Jan 4, 2017
@grahamc
Copy link
Member

grahamc commented Jan 4, 2017

One other thing -- I had to rename your entry in maintainers.nix because it needs to match your github name. I did that in fa89f84.

@polyrod
Copy link
Contributor Author

polyrod commented Jan 4, 2017

Hi graham,
in e0878ce you changed the hyphen to dash ..... the original file on the debian repo has a hyphen in its name to seperate name and version . Your change broke futchurl downloading src .

@LnL7
Copy link
Member

LnL7 commented Jan 4, 2017

Oh, can you create a new pr with a fix?

@polyrod
Copy link
Contributor Author

polyrod commented Jan 4, 2017

Ok fixed the hyphen issue and avoided fully qualified attribute names as you suggested

@polyrod
Copy link
Contributor Author

polyrod commented Jan 4, 2017 via email

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