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

WIP: pgFormatter: init at 3.2 #49646

Closed
wants to merge 2 commits into from
Closed

WIP: pgFormatter: init at 3.2 #49646

wants to merge 2 commits into from

Conversation

srghma
Copy link
Contributor

@srghma srghma commented Nov 2, 2018

Motivation for this change
Things done
  • 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.


buildPerlPackage rec {
name = "pgFormatter-${version}";
version = "v3.2";
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think the version should have a v in it.
(since you're using this in the name too)

So then the rev in fetchFromGitHub should be

rev    = "v${version}";

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, will fix

@srghma
Copy link
Contributor Author

srghma commented Nov 2, 2018

Hi, this package is not working

 ~/.dotfiles   master ●✚  pg_format
/nix/store/dzvbhkzfgwkq97ljkcvi4gs7vmflh6a0-coreutils-8.30/bin/env: ‘perl -I/nix/store/0ingn8cwwnl84i374hcl6nafsm2c5m2p-perl-5.’: No such file or directory
/nix/store/dzvbhkzfgwkq97ljkcvi4gs7vmflh6a0-coreutils-8.30/bin/env: use -[v]S to pass options in shebang lines
 ✘  ~/.dotfiles   master ●✚  whereis pg_format
pg_format: /nix/store/j4vk14jxkk1rmmnb81d5kg19d8rnwnrf-system-path/bin/pg_format
 ~/.dotfiles   master ●✚  head -n10 /nix/store/j4vk14jxkk1rmmnb81d5kg19d8rnwnrf-system-path/bin/pg_format
#!/nix/store/dzvbhkzfgwkq97ljkcvi4gs7vmflh6a0-coreutils-8.30/bin/env perl -I/nix/store/0ingn8cwwnl84i374hcl6nafsm2c5m2p-perl-5.28.0/lib/perl5/site_perl -I/nix/store/0ingn8cwwnl84i374hcl6nafsm2c5m2p-perl-5.28.0/lib/perl5/site_perl -I/nix/store/0ingn8cwwnl84i374hcl6nafsm2c5m2p-perl-5.28.0/lib/perl5/site_perl -I/nix/store/qln2yx1wz9z16ysr0picqxz4shwb2b8d-perl5.28.0-pgFormatter-v3.2/lib/perl5/site_perl

use strict;
use warnings;
use warnings qw( FATAL );
use Encode qw( decode );

if ( grep /\P{ASCII}/ => @ARGV ) {
    @ARGV = map { decode( 'UTF-8', $_ ) } @ARGV;
}

Can someone help me?


UPDATE

this shebang works

#!perl -I/nix/store/0ingn8cwwnl84i374hcl6nafsm2c5m2p-perl-5.28.0/lib/perl5/site_perl

@srghma
Copy link
Contributor Author

srghma commented Nov 2, 2018

@worldofpeace thx for review, but I'm no longer interested in this pr, sorry for troubles

  1. pg_format makes bad formatting
  2. it's not working in current form and I dont know how to fix it

I'll leave this PR open, maybe someone would like to continue this

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

4 participants