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

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
Contributor

@Synthetica9 Synthetica9 commented Dec 4, 2019

LGTM :)

@Ma27 Ma27 merged commit 1b66665 into NixOS:master Dec 4, 2019
15 checks passed
15 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
nix-linter on aarch64-linux Success
Details
nix-linter on x86_64-linux Success
Details
@marsam marsam deleted the marsam:add-nix-linter branch Dec 4, 2019
@marsam
Copy link
Contributor Author

@marsam 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

@cdepillabout cdepillabout commented Dec 4, 2019

@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
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.