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

kakoune: Prefix version with 'v' #50617

Merged
merged 4 commits into from Nov 20, 2018
Merged

kakoune: Prefix version with 'v' #50617

merged 4 commits into from Nov 20, 2018

Conversation

utdemir
Copy link
Member

@utdemir utdemir commented Nov 18, 2018

Turns out there's some tooling parsing the version number and having a
'v' prefix works better in that case.

See: kakoune-lsp/kakoune-lsp#99

  • Tested using sandboxing (nix.useSandbox on NixOS, or option 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/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

Turns out there's some tooling parsing the version number and having a
'v' prefix works better in that case.

I tested that it builds & works fine on NixOS.

See: kakoune-lsp/kakoune-lsp#99
Copy link
Contributor

@c0bw3b c0bw3b left a comment

Choose a reason for hiding this comment

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

No that's wrong. In nixpkgs a version must start with a number
https://nixos.org/nixpkgs/manual/#sec-package-naming

The version part of the name attribute must start with a digit (following a dash) — e.g., "hello-0.3.1rc2".

@utdemir
Copy link
Member Author

utdemir commented Nov 18, 2018

Oh, I did not know that. Thank you @c0bw3b , closing the PR.

I'll re-open this one and modify it to only modify the build script.

@utdemir utdemir closed this Nov 18, 2018
@c0bw3b
Copy link
Contributor

c0bw3b commented Nov 18, 2018

To be more informative here, the reason is because nix will parse that to find the package name on one side, and the version number on the other.

With what you were doing it would have ended like this :

nix-repl> test = "kakoune-unstable-v2018.10.27"
nix-repl> builtins.parseDrvName test
{ name = "kakoune-unstable-v2018.10.27"; version = ""; }

@utdemir
Copy link
Member Author

utdemir commented Nov 18, 2018

@c0bw3b In which cases Nix needs to parse the package name?

@c0bw3b
Copy link
Contributor

c0bw3b commented Nov 18, 2018

Every time it evaluates the whole <nixpkgs> set

@Mic92
Copy link
Member

Mic92 commented Nov 18, 2018

@utdemir it is used in nix-env for updating packages.

@c0bw3b
Copy link
Contributor

c0bw3b commented Nov 20, 2018

@GrahamcOfBorg build kakoune

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: kakoune

Partial log (click to expand)

install -m 0644 ../doc/kak.1.gz /nix/store/4zhf8j5dpdbfizlwfp05bvxrv9l7fsah-kakoune-unstable-2018.10.27/share/man/man1
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/4zhf8j5dpdbfizlwfp05bvxrv9l7fsah-kakoune-unstable-2018.10.27
shrinking /nix/store/4zhf8j5dpdbfizlwfp05bvxrv9l7fsah-kakoune-unstable-2018.10.27/bin/kak
gzipping man pages under /nix/store/4zhf8j5dpdbfizlwfp05bvxrv9l7fsah-kakoune-unstable-2018.10.27/share/man/
strip is /nix/store/rpbg8gmqxhz8g61p1plz5d2srs84pvmv-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/4zhf8j5dpdbfizlwfp05bvxrv9l7fsah-kakoune-unstable-2018.10.27/bin
patching script interpreter paths in /nix/store/4zhf8j5dpdbfizlwfp05bvxrv9l7fsah-kakoune-unstable-2018.10.27
checking for references to /build in /nix/store/4zhf8j5dpdbfizlwfp05bvxrv9l7fsah-kakoune-unstable-2018.10.27...
/nix/store/4zhf8j5dpdbfizlwfp05bvxrv9l7fsah-kakoune-unstable-2018.10.27

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: kakoune

Partial log (click to expand)

install -m 0644 ../doc/kak.1.gz /nix/store/rm0764hpb2md5zcmwdv2jh8i2ngnw38v-kakoune-unstable-2018.10.27/share/man/man1
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/rm0764hpb2md5zcmwdv2jh8i2ngnw38v-kakoune-unstable-2018.10.27
shrinking /nix/store/rm0764hpb2md5zcmwdv2jh8i2ngnw38v-kakoune-unstable-2018.10.27/bin/kak
gzipping man pages under /nix/store/rm0764hpb2md5zcmwdv2jh8i2ngnw38v-kakoune-unstable-2018.10.27/share/man/
strip is /nix/store/6dpnd5aniypn8124mmy8f88s4mq2zl07-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/rm0764hpb2md5zcmwdv2jh8i2ngnw38v-kakoune-unstable-2018.10.27/bin
patching script interpreter paths in /nix/store/rm0764hpb2md5zcmwdv2jh8i2ngnw38v-kakoune-unstable-2018.10.27
checking for references to /build in /nix/store/rm0764hpb2md5zcmwdv2jh8i2ngnw38v-kakoune-unstable-2018.10.27...
/nix/store/rm0764hpb2md5zcmwdv2jh8i2ngnw38v-kakoune-unstable-2018.10.27

@c0bw3b
Copy link
Contributor

c0bw3b commented Nov 20, 2018

@utdemir this is complete for you? You don't have more additions to bring to this PR?

@utdemir
Copy link
Member Author

utdemir commented Nov 20, 2018

@c0bw3b Yes, this is complete for me; I think we can merge it if everything is good. Thank you very much!

@c0bw3b c0bw3b merged commit 461c9d7 into NixOS:master Nov 20, 2018
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