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

m32edit and x32edit: init at 3.2 #40666

Merged
merged 1 commit into from Jun 6, 2018
Merged

m32edit and x32edit: init at 3.2 #40666

merged 1 commit into from Jun 6, 2018

Conversation

magnetophon
Copy link
Member

@magnetophon magnetophon commented May 17, 2018

Motivation for this change
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
    • 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"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@@ -0,0 +1,43 @@
{ stdenv, fetchurl, lib, libX11, libXext, alsaLib, freetype }:
# // libStdCxx = stdenv.cc.cc.lib;
Copy link
Member

Choose a reason for hiding this comment

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

Could you clean this?

Copy link
Member Author

Choose a reason for hiding this comment

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

done

sha256 = "1cds6qinz37086l6pmmgrzrxadygjr2z96sjjyznnai2wz4z2nrd";
};

sourceRoot = ".";
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is required.

Copy link
Member Author

Choose a reason for hiding this comment

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

It doesn't build without this.

};

sourceRoot = ".";
buildPhase = ":"; # nothing to build
Copy link
Member

Choose a reason for hiding this comment

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

It would be better to set the dontBuild=true attribute.

@nlewo
Copy link
Member

nlewo commented May 20, 2018

@magnetophon could you rename the attribute to m32edit (we don't use uppercase)?

@magnetophon
Copy link
Member Author

@nlewo like this?
I also added X32-Edit.
Is there a way to re-use the code of those 2 pkgs, since they're almost identical?

@nlewo
Copy link
Member

nlewo commented May 24, 2018

Yes, I think you could create files audio/behringer/x32-edit.nix and audio/behringer/m32-edit.nix that call a function defined in audio/behringer/generic.nix. You could get inspiration from the cassandra package (several cassandra versions share common code).

@magnetophon
Copy link
Member Author

@nlewo Thanks for the tip.
Done!

@magnetophon magnetophon changed the title M32edit: init at 3.2 m32edit and x32edit: init at 3.2 May 25, 2018
{ stdenv, fetchurl, lib, libX11, libXext, alsaLib, freetype, brand, type, version, homepage, sha256, ... }:
stdenv.mkDerivation rec {
inherit type;
baseName = "${type}-Edit";
Copy link
Member

Choose a reason for hiding this comment

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

By convention, could you call this attribute pname.
Moreover, the name of a package should not contain any uppercase letters.

Copy link
Member Author

Choose a reason for hiding this comment

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

type is also with uppercase, since it's also used in the url and description.
Can I just do pname = "${type}-edit";,or would you suggest I use a string-manipulation function to change the case?
A function for that probably exists in nix, I've see similar things, but I have no idea how to find it.

@nlewo
Copy link
Member

nlewo commented May 27, 2018 via email

@nlewo
Copy link
Member

nlewo commented Jun 5, 2018

@magnetophon Do you need help? I can also fix it for you because it's really close to be merged:/

@magnetophon
Copy link
Member Author

magnetophon commented Jun 5, 2018

@nlewo Thanks! Please do, my build sytem is messed up after a new install.
When I nixos-rebuild,I get: error: while setting up the build environment: getting attributes of path '/etc/hosts': Permission denied.

@nlewo nlewo merged commit 2c3e532 into NixOS:master Jun 6, 2018
@nlewo
Copy link
Member

nlewo commented Jun 6, 2018

Package name fixed in 5892931.
Thanks.

@magnetophon
Copy link
Member Author

Thanks a lot!

@magnetophon magnetophon deleted the M32edit branch June 6, 2018 21:09
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

3 participants