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

Add new package "ncpamixer" #34564

Merged
merged 2 commits into from Feb 16, 2018
Merged

Add new package "ncpamixer" #34564

merged 2 commits into from Feb 16, 2018

Conversation

Stekke
Copy link
Contributor

@Stekke Stekke commented Feb 3, 2018

Motivation for this change

The only package I know of that has user a user friendly way to adjust pulse audio volume from a command line interface.
It works the same way as alsamixer but mimics the user interface from pavucontrol.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • [ x ] 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 nox --run "nox-review wip"
  • [ x ] Tested execution of all binary files (usually in ./result/bin/)
  • [ x ] Fits CONTRIBUTING.md.

make PREFIX=$out
'';

meta = with stdenv.lib; {
Copy link
Member

Choose a reason for hiding this comment

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

Will you be the maintainer of this expression?

@FRidh
Copy link
Member

FRidh commented Feb 4, 2018

@GrahamcOfBorg build ncpamixer

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

Package ‘ncpamixer-1.2’ in /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/pkgs/applications/audio/ncpamixer/default.nix:23 is not supported on ‘x86_64-darwin’, refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

-- Install configuration: "release"
-- Installing: /nix/store/i69r4gh668z24fgdz51hs1ck58rxchf0-ncpamixer-1.2/bin/ncpamixer
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/i69r4gh668z24fgdz51hs1ck58rxchf0-ncpamixer-1.2
shrinking /nix/store/i69r4gh668z24fgdz51hs1ck58rxchf0-ncpamixer-1.2/bin/ncpamixer
strip is /nix/store/5qj61lcvzlap87rf6blvf8p577d482bv-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/i69r4gh668z24fgdz51hs1ck58rxchf0-ncpamixer-1.2/bin 
patching script interpreter paths in /nix/store/i69r4gh668z24fgdz51hs1ck58rxchf0-ncpamixer-1.2
checking for references to /tmp/nix-build-ncpamixer-1.2.drv-0 in /nix/store/i69r4gh668z24fgdz51hs1ck58rxchf0-ncpamixer-1.2...
/nix/store/i69r4gh668z24fgdz51hs1ck58rxchf0-ncpamixer-1.2

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

-- Install configuration: "release"
-- Installing: /nix/store/48qsyf2g614z1r6cbddmb48jd1pjzi7n-ncpamixer-1.2/bin/ncpamixer
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/48qsyf2g614z1r6cbddmb48jd1pjzi7n-ncpamixer-1.2
shrinking /nix/store/48qsyf2g614z1r6cbddmb48jd1pjzi7n-ncpamixer-1.2/bin/ncpamixer
strip is /nix/store/xmpjypwjmp2qi1chs5kr0hacnh161ls4-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/48qsyf2g614z1r6cbddmb48jd1pjzi7n-ncpamixer-1.2/bin
patching script interpreter paths in /nix/store/48qsyf2g614z1r6cbddmb48jd1pjzi7n-ncpamixer-1.2
checking for references to /build in /nix/store/48qsyf2g614z1r6cbddmb48jd1pjzi7n-ncpamixer-1.2...
/nix/store/48qsyf2g614z1r6cbddmb48jd1pjzi7n-ncpamixer-1.2

Copy link
Member

@FRidh FRidh left a comment

Choose a reason for hiding this comment

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

Please check the contributing guidelines on how to name commits.

nativeBuildInputs = [ cmake pkgconfig ];

configurePhase = ''
make PREFIX=$out
Copy link
Member

Choose a reason for hiding this comment

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

While this works I think the proper approach would be:

--- a/pkgs/applications/audio/ncpamixer/default.nix
+++ b/pkgs/applications/audio/ncpamixer/default.nix
@@ -16,7 +16,11 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake pkgconfig ];

   configurePhase = ''
-    make PREFIX=$out
+    make PREFIX=$out build/Makefile
+  '';
+
+  buildPhase = ''
+    make build
   '';

   meta = with stdenv.lib; {

Otherwise you are building the project in the configure phase.

@Stekke Stekke force-pushed the master branch 2 times, most recently from f50423c to 38b5214 Compare February 13, 2018 19:12
@Stekke
Copy link
Contributor Author

Stekke commented Feb 13, 2018

I fixed the commit message and applied andir patch.
@FRidh Do I need to add myself to maintainers.nix to be the maintainer of this package?

@FRidh
Copy link
Member

FRidh commented Feb 14, 2018

@StijnDW yes, you can use a separate commit for that but as part of this PR.

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

6 participants