Skip to content

i3lock-pixeled: init at 1.1.0 #25761

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

Merged
merged 2 commits into from
May 20, 2017
Merged

i3lock-pixeled: init at 1.1.0 #25761

merged 2 commits into from
May 20, 2017

Conversation

Ma27
Copy link
Member

@Ma27 Ma27 commented May 13, 2017

Motivation for this change

Simple derivation for my i3lock helper.

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

Sorry, something went wrong.

@pSub pSub added the 8.has: package (new) This PR adds a new package label May 14, 2017
@Ma27
Copy link
Member Author

Ma27 commented May 15, 2017

I rebased onto the fixed master, so travis-ci should evaluate properly now %)

{ stdenv, pkgs, fetchurl }:

stdenv.mkDerivation rec {
name = "i3lock-pixeled-pkg-${version}";
Copy link
Member

Choose a reason for hiding this comment

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

why is pkg in the name?

version = "1.1.0";

src = fetchurl {
url = "https://github.com/Ma27/i3lock-pixeled/archive/1.1.0.tar.gz";
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 prefer:

    url = "https://github.com/Ma27/i3lock-pixeled/archive/${version}.tar.gz";

for easier maintenance.

@Ma27
Copy link
Member Author

Ma27 commented May 15, 2017

good catches, thanks @lsix

sha256 = "046qbx4qvcc66h53h4mm9pyjj9gjc6dzy38a0f0jc5a84xbivh7k";
};

buildInputs = with pkgs; [ i3lock imagemagick scrot playerctl ];
Copy link
Member

Choose a reason for hiding this comment

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

I think that buildInputs should be renamed propagatedBuildInputs since all those programs are required at run-time and not present otherwise.

@sifmelcara
Copy link
Member

The script cannot find scrot, convert, and i3lock at runtime if these programs are not installed in user's environment. (And I believe propagatedBuildInputs do not help solve this problem)
I would probably use a wrapper and add necessary binaries to $PATH before the execution of i3lock-pixeled. (Not sure if this is the best solution)

@Ma27
Copy link
Member Author

Ma27 commented May 16, 2017

I added a patchPhase (inspired by i3lock-fancy derivation) which replaces all executables with fully-qualified nix-store paths.

Furthermroe I squashed everything into a single commit to avoid a bloated history.

@Ma27
Copy link
Member Author

Ma27 commented May 16, 2017

anything else missing??

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@Ma27
Copy link
Member Author

Ma27 commented May 17, 2017

I rebased onto the current master and the build seems fine now...

@Mic92 Mic92 merged commit 196fa7e into NixOS:master May 20, 2017
@Ma27 Ma27 deleted the new-package/i3lock-pixeled branch May 20, 2017 16:50
--replace i3lock "${pkgs.i3lock}/bin/i3lock" \
--replace convert "${pkgs.imagemagick}/bin/convert" \
--replace scrot "${pkgs.scrot}/bin/scrot" \
--replace playerctl "${pkgs.playerctl}/bin/playerctl#"
Copy link
Member Author

Choose a reason for hiding this comment

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

I think that this breaks the executable as # is interpreted as comment in a shell file, right?

Copy link
Member

Choose a reason for hiding this comment

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

oh. typo

Copy link
Member

Choose a reason for hiding this comment

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

fixed in 56835b1

Copy link
Member Author

Choose a reason for hiding this comment

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

ok, thanks :-)

@Ma27 Ma27 restored the new-package/i3lock-pixeled branch May 20, 2017 16:51
@Ma27 Ma27 deleted the new-package/i3lock-pixeled branch May 20, 2017 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: package (new) This PR adds a new package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants