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

nix-linter: init at 2019-04-26 #74977

Merged
merged 1 commit into from Dec 4, 2019
Merged

nix-linter: init at 2019-04-26 #74977

merged 1 commit into from Dec 4, 2019

Conversation

marsam
Copy link
Contributor

@marsam marsam commented Dec 4, 2019

Motivation for this change

Add https://github.com/Synthetica9/nix-linter

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 nix-review --run "nix-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.
Notify maintainers

cc @cdepillabout

Copy link
Member

@davidak davidak left a comment

Choose a reason for hiding this comment

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

Reviewed points
  • package path fits guidelines
  • package name fits guidelines
  • package version fits guidelines
  • package build on x86_64
  • executables tested on x86_64
  • meta.description is set and fits guidelines
  • meta.license fits upstream license
  • meta.platforms is set
  • meta.maintainers is set
  • build time only dependencies are declared in nativeBuildInputs
  • source is fetched using the appropriate function
  • phases are respected
  • patches that are remotely available are fetched with fetchpatch
Possible improvements

Please add meta.platforms.

Comments

Thanks for your contribution! ❇️

@Synthetica9
Copy link
Member

LGTM :)

@Ma27 Ma27 merged commit 1b66665 into NixOS:master Dec 4, 2019
@marsam marsam deleted the add-nix-linter branch December 4, 2019 23:51
@marsam
Copy link
Contributor Author

marsam commented Dec 4, 2019

@davidak thanks for reviewing, this expression uses haskellPackages mkDerivation which sets ghc platforms by default

, platforms ? with stdenv.lib.platforms; unix ++ windows # GHC can cross-compile

you can check it with nix eval -f . "pkgs.nix-linter.meta.platforms"

@cdepillabout
Copy link
Member

@marsam There are two big problems with writing a Haskell derivation by hand:

  1. You have to update it by hand.
  2. It is not in the Haskell package set, so other Haskell packages can't use it.

I recently packaged the PureScript build tool Spago:

#74557

The actual derivation is just generated by cabal2nix, so it is easy to update:

https://github.com/NixOS/nixpkgs/pull/74557/files#diff-acf4a25890dd1c6c9e1a8dc073eb4404


The other easy solution would be to get upstream (@Synthetica9?) to just make a release to Hackage. Then nix-linter would be pulled in automatically to the Haskell package set and you wouldn't have to have a separate derivation.

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