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

xdragon: Init at 1.1.1 #95925

Merged
merged 1 commit into from Sep 10, 2020
Merged

xdragon: Init at 1.1.1 #95925

merged 1 commit into from Sep 10, 2020

Conversation

dasJ
Copy link
Member

@dasJ dasJ commented Aug 21, 2020

The package is renamed from dragon to prevent name conflicts with the
existing package as recommended in [1].

1: mwh/dragon#17

Motivation for this change

I use this.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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.

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

please fix

getting status of '/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/packet-spot-eval-3/pkgs/misc/xdragon': No such file or directory

@@ -26872,6 +26872,8 @@ in

sift = callPackage ../tools/text/sift { };

xdragon = callPackage ../misc/xdragon { };
Copy link
Contributor

Choose a reason for hiding this comment

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

should be ../applications/misc/xdragon (thats what causes the ofborg error)

Copy link
Member Author

@dasJ dasJ Aug 24, 2020

Choose a reason for hiding this comment

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

Me: "yeah, I can develop this package out-of-tree, what could possibly go wrong"
Also me:

@@ -0,0 +1,27 @@
{ stdenv, fetchFromGitHub, pkgconfig, gtk3 }:
Copy link
Contributor

Choose a reason for hiding this comment

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

pkgconfig is an alias

Suggested change
{ stdenv, fetchFromGitHub, pkgconfig, gtk3 }:
{ stdenv, fetchFromGitHub, pkg-config, gtk3 }:

owner = "mwh";
repo = "dragon";
rev = "v${version}";
sha256 = "sha256-Kq/wiqj9I6W6BnX24Ar7Y4v7PAaXaXEwl80dANL4/zk=";
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the convention is to still use base32 hashes:

$ nix to-base32 sha256-Kq/wiqj9I6W6BnX24Ar7Y4v7PAaXaXEwl80dANL4/zk=
0fgzz39007fdjwq72scp0qygp2v3zc5f1xkm0sxaa8zxm25g1bra

Copy link
Member Author

Choose a reason for hiding this comment

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

Will there be one day where everyone will switch or is there another reason to use non-sri hashes?

Copy link
Contributor

Choose a reason for hiding this comment

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

you can see the discussions here: #89308

essentially, the min-version needs to be at a version which supports it. And I believe it's still at 2.0, but needs to be at 2.2 (could have changed recently)

sha256 = "sha256-Kq/wiqj9I6W6BnX24Ar7Y4v7PAaXaXEwl80dANL4/zk=";
};

buildInputs = [ pkgconfig gtk3 ];
Copy link
Contributor

Choose a reason for hiding this comment

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

for cross compilation

Suggested change
buildInputs = [ pkgconfig gtk3 ];
naviteBuildInputs = [ pkg-config ];
buildInputs = [ gtk3 ];

meta = with stdenv.lib; {
description = "Simple drag-and-drop source/sink for X (called dragon in upstream)";
homepage = "https://github.com/mwh/dragon";
licenses = licenses.gpl3;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
licenses = licenses.gpl3;
license = licenses.gpl3;
evaluation aborted with the following error message: 'Failed to evaluate xdragon-1.1.1: «unknown-meta»: has an invalid meta attrset:
        - key 'licenses' is unrecognized; expected one of: 
         ['available', 'badPlatforms', 'branch', 'broken', 'changelog', 'description', 'downloadPage', 'downloadURLRegexp', 'executables', 'homepage', 'hydraPlatforms', 'isBuildPythonPackage', 'isFcitxEngine', 'isGutenprint', 'isIbusEngine', 'knownVulnerabilities', 'license', 'longDescription', 'maintainers', 'name', 'outputsToInstall', 'platforms', 'position', 'priority', 'repositories', 'schedulingPriority', 'tag', 'tests', 'timeout', 'updateWalker', 'version']'

Comment on lines 17 to 20
installFlags = [ "PREFIX=${placeholder "out"}/bin" ];
postInstall = ''
mv $out/bin/dragon $out/bin/xdragon
'';
Copy link
Contributor

Choose a reason for hiding this comment

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

if the intended behavior is for it to be named dragon, we should keep it as dragon. and maybe just add a link to it:

  ln -s $out/bin/dragon $out/bin/xdragon

if this was done to avoid the scenario of conflicts with the existing dragon package, then we use lib.lowPrio in all-packages.nix to make the existing dragon prefered

The package is renamed from `dragon` to prevent name conflicts with the
existing package as recommended in [1].

1: mwh/dragon#17
Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

LGTM
shows usage

https://github.com/NixOS/nixpkgs/pull/95925
1 package built:
xdragon

@dasJ dasJ requested a review from Lassulus September 1, 2020 10:07
@Lassulus Lassulus merged commit bd412cb into NixOS:master Sep 10, 2020
@dasJ dasJ deleted the init/xdragon branch September 14, 2020 21:08
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

4 participants