Skip to content

haskellPackages.glualint: init at 1.24.3#233112

Closed
ruby0b wants to merge 1 commit intoNixOS:masterfrom
ruby0b:glualint
Closed

haskellPackages.glualint: init at 1.24.3#233112
ruby0b wants to merge 1 commit intoNixOS:masterfrom
ruby0b:glualint

Conversation

@ruby0b
Copy link
Contributor

@ruby0b ruby0b commented May 20, 2023

Description of changes

(corrected and updated version of #222356)

glualint is a linter and pretty printer for Garry's Mod's variant of Lua.
The derivation pretty much just uses the project's own default.nix.

The package is not available on hackage and the version stated in its cabal file is a constant 0.1.0.0 (even though the github release is at version 1.24.3). The derivation uses the github release version.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added the 6.topic: haskell General-purpose, statically typed, purely functional programming language label May 20, 2023
@ruby0b ruby0b changed the title haskellPackages.glualint: init at 1.24.1 haskellPackages.glualint: init at 1.24.3 May 20, 2023
@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels May 21, 2023
@cdepillabout
Copy link
Member

Could you ask upstream if they would consider making releases to Hackage?

It is easier for us (and other Linux distros) to package Haskell packages if they have been released to Hackage.

@ruby0b
Copy link
Contributor Author

ruby0b commented May 26, 2023

they said they would try uploading a hackage release when they get the time, I guess the PR is on hold for now

Copy link
Contributor

@FPtje FPtje left a comment

Choose a reason for hiding this comment

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

Thanks for the effort to add glualint to nixpkgs! I've added some preliminary comments.


preBuild = ''
echo "Generating attribute grammar haskell files"
uuagc --haskellsyntax --data src/GLua/AG/AST.ag
Copy link
Contributor

Choose a reason for hiding this comment

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

It appears that the cabal sdist command I'll use to upload glualint will already turn the UUAGC .ag files into .hs files.

When glualint is uploaded to hackage, I'm hoping that the Nixpkgs hackage script will automatically pick it up and add it to pkgs/development/haskell-modules/hackage-packages.nix, making this entire file no longer needed.

# Needs OneTuple for ghc < 9.2
binary-orphans = addBuildDepends [ self.OneTuple ] super.binary-orphans;

# 2023-05-212: doesn't support Cabal >= 3.8 but GHC 9 works since it ships cabal 3.6
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo in date.

@FPtje
Copy link
Contributor

FPtje commented May 31, 2023

Glualint has just been uploaded to hackage: https://hackage.haskell.org/package/glualint

I'm not sure how often the "refresh haddock packages" script for nixpkgs runs, but I think the next run should pick it up?

@cdepillabout
Copy link
Member

The Hackage pin has just been bumped in the haskell-updates branch, so now haskellPackages.glualint should be available. Although it looks like it depends on packages marked broken, so some work may be needed to get it buildable.

@FPtje
Copy link
Contributor

FPtje commented Jun 7, 2023

Awesome! I see one of the marked broken dependencies is uuagc-cabal. This package builds on the latest haskell-updates branch commit though:

On commit: 3620f98
On x86_64-linux

nix-repl> :b haskell.lib.markUnbroken haskellPackages.uuagc-cabal

This derivation produced the following outputs:
  doc -> /nix/store/iz9bw3xw6iacgpjcdy9xgvf3f6hffxqi-uuagc-cabal-1.3.0.0-doc
  out -> /nix/store/lmy8v1jpaxyj6b6ba6x86qkyy5m4z58d-uuagc-cabal-1.3.0.0

I know this package was incompatible with GHC 9.2 and 9.4, but that was fixed in version 1.3.0.0. Would it be possible to unmark this package as broken?


Another package marked broken is uuagc itself, but it fails to build due to a build error in vector, but it had the same problem as uuagc-cabal, and also has it fixed in the latest version.

@FPtje
Copy link
Contributor

FPtje commented Jun 7, 2023

Update:

nix-repl> :b (haskellPackages.extend (final: previous: {uuagc-cabal = haskell.lib.markUnbroken previous.uuagc-cabal; vector = haskell.lib.dontCheck previous.vector; aeson = haskell.lib.dontCheck previous.aeson;})).glualint

This derivation produced the following outputs:
  doc -> /nix/store/5f7q9cw1ih6fim96gy6ljwdz1d24fabl-glualint-1.24.6-doc
  out -> /nix/store/1vd5yw7vks0zzhq7hcxbi6i6bfxr3f4f-glualint-1.24.6

Glualint builds if I simply mark uuagc-cabal as unbroken, and disable tests for vector and aeson. Assuming vector and aeson get their own love somewhere, I think it's safe to say glualint will build when the broken flag for uuagc-cabal is removed 👍

@cdepillabout
Copy link
Member

@FPtje Thanks for the debugging. Could you send a PR marking uuagc-cabal and uuagc as now unbroken to the haskell-updates branch? You can ignore the errors in vector and aeson for now.

@sternenseemann
Copy link
Member

glualint builds on haskell-updates now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: haskell General-purpose, statically typed, purely functional programming language 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants