sup: use bundlerApp, cleanup (#60515)

This commit is contained in:
Michael Fellinger 2019-04-30 20:13:18 +02:00 committed by zimbatm
parent bc757ff4f2
commit 98e0f54b85
6 changed files with 194 additions and 160 deletions

@ -2,17 +2,17 @@ GEM
remote: https://rubygems.org/
specs:
chronic (0.9.1)
gpgme (2.0.12)
mini_portile2 (~> 2.1.0)
highline (1.7.8)
gpgme (2.0.18)
mini_portile2 (~> 2.3)
highline (2.0.2)
locale (2.1.2)
lockfile (2.1.3)
mime-types (3.0)
mime-types (3.2.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0221)
mini_portile2 (2.1.0)
ncursesw (1.4.9)
rake (11.1.2)
mime-types-data (3.2019.0331)
mini_portile2 (2.4.0)
ncursesw (1.4.10)
rake (12.3.2)
rmail-sup (1.0.1)
sup (0.22.1)
chronic (~> 0.9.1)
@ -24,8 +24,8 @@ GEM
rmail-sup (~> 1.0.1)
trollop (>= 1.12)
unicode (~> 0.4.4)
trollop (2.1.2)
unicode (0.4.4.2)
trollop (2.9.9)
unicode (0.4.4.4)
xapian-ruby (1.2.22)
PLATFORMS
@ -38,4 +38,4 @@ DEPENDENCIES
xapian-ruby (~> 1.2.22)
BUNDLED WITH
1.10.6
1.17.2

@ -1,23 +1,30 @@
{ lib, bundlerEnv, ruby }:
{ lib, bundlerApp, rake, which }:
bundlerEnv {
name = "sup-0.22.1";
# Updated with:
# rm gemset.nix Gemfile.lock
# nix-shell -p bundler bundix --run 'bundle lock && bundix'
inherit ruby;
# Updated with:
# nix-shell -p bundix -p bundler -p ncurses -p ruby -p which -p zlib -p libuuid
# bundle install --path ./vendor
# bundix
gemfile = ./Gemfile;
lockfile = ./Gemfile.lock;
gemset = ./gemset.nix;
bundlerApp {
pname = "sup";
gemdir = ./.;
exes = [
"sup"
"sup-add"
"sup-config"
"sup-dump"
"sup-import-dump"
"sup-psych-ify-config-files"
"sup-recover-sources"
"sup-sync"
"sup-sync-back-maildir"
"sup-tweak-labels"
];
meta = with lib; {
description = "A curses threads-with-tags style email client";
homepage = http://sup-heliotrope.github.io;
license = licenses.gpl2;
maintainers = with maintainers; [ cstrahan lovek323 ];
maintainers = with maintainers; [ cstrahan lovek323 manveru ];
platforms = platforms.unix;
};
}

@ -1,126 +1,155 @@
{
xapian-ruby = {
version = "1.2.22";
source = {
type = "gem";
remotes = ["https://rubygems.org"];
sha256 = "1xbarnxmhy6r0rxpspn4wk85j183w6b18nah73djcs06b3gfas15";
};
dependencies = [ "rake" ];
};
unicode = {
version = "0.4.4.2";
source = {
type = "gem";
remotes = ["https://rubygems.org"];
sha256 = "15fggljzan8zvmr8h12b5m7pcj1gvskmmnx367xs4p0rrpnpil8g";
};
};
trollop = {
version = "2.1.2";
source = {
type = "gem";
remotes = ["https://rubygems.org"];
sha256 = "0415y63df86sqj43c0l82and65ia5h64if7n0znkbrmi6y0jwhl8";
};
};
sup = {
version = "0.22.1";
source = {
type = "gem";
remotes = ["https://rubygems.org"];
sha256 = "17s2sxismf46zdhgr6g2v53fw9f3sp1ijx7xdw3wx8qpcsgazcgi";
};
dependencies = ["chronic" "highline" "locale" "lockfile" "mime-types" "ncursesw" "rmail-sup" "trollop" "unicode" "rake" ];
};
rmail-sup = {
version = "1.0.1";
source = {
type = "gem";
remotes = ["https://rubygems.org"];
sha256 = "1xswk101s560lxqaax3plqh8vjx7jjspnggdwb3q80m358f92q9g";
};
};
rake = {
version = "11.1.2";
source = {
type = "gem";
remotes = ["https://rubygems.org"];
sha256 = "0jfmy7kd543ldi3d4fg35a1w7q6jikpnzxqj4bzchfbn94cbabqz";
};
};
ncursesw = {
version = "1.4.9";
source = {
type = "gem";
remotes = ["https://rubygems.org"];
sha256 = "154cls3b237imdbhih7rni5p85nw6mpbpkzdw08jxzvqaml7q093";
};
};
mini_portile2 = {
version = "2.1.0";
source = {
type = "gem";
remotes = ["https://rubygems.org"];
sha256 = "1y25adxb1hgg1wb2rn20g3vl07qziq6fz364jc5694611zz863hb";
};
};
mime-types-data = {
version = "3.2016.0221";
source = {
type = "gem";
remotes = ["https://rubygems.org"];
sha256 = "05ygjn0nnfh6yp1wsi574jckk95wqg9a6g598wk4svvrkmkrzkpn";
};
};
mime-types = {
version = "3.0";
source = {
type = "gem";
remotes = ["https://rubygems.org"];
sha256 = "1snjc38a9vqvy8j41xld1i1byq9prbl955pbjw7dxqcfcirqlzra";
};
dependencies = ["mime-types-data"];
};
lockfile = {
version = "2.1.3";
source = {
type = "gem";
remotes = ["https://rubygems.org"];
sha256 = "0dij3ijywylvfgrpi2i0k17f6w0wjhnjjw0k9030f54z56cz7jrr";
};
};
locale = {
version = "2.1.2";
source = {
type = "gem";
remotes = ["https://rubygems.org"];
sha256 = "1sls9bq4krx0fmnzmlbn64dw23c4d6pz46ynjzrn9k8zyassdd0x";
};
};
highline = {
version = "1.7.8";
source = {
type = "gem";
remotes = ["https://rubygems.org"];
sha256 = "1nf5lgdn6ni2lpfdn4gk3gi47fmnca2bdirabbjbz1fk9w4p8lkr";
};
};
gpgme = {
version = "2.0.12";
source = {
type = "gem";
remotes = ["https://rubygems.org"];
sha256 = "0a04a76dw9dias0a8rp6dyk3vx2y024gim40lg2md6zdh2m1kx85";
};
dependencies = ["mini_portile2"];
};
chronic = {
version = "0.9.1";
groups = ["default"];
platforms = [];
source = {
type = "gem";
remotes = ["https://rubygems.org"];
sha256 = "0kspaxpfy7yvyk1lvpx31w852qfj8wb9z04mcj5bzi70ljb9awqk";
type = "gem";
};
version = "0.9.1";
};
}
gpgme = {
dependencies = ["mini_portile2"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "12fqirxr964mc8jwsfl5nif6q4wcckrmj7w4c9ci4xg9xy2b9v6m";
type = "gem";
};
version = "2.0.18";
};
highline = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1g0zpalfj8wvca86hcnirir5py2zyqrhkgdgv9f87fxkjaw815wr";
type = "gem";
};
version = "2.0.2";
};
locale = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1sls9bq4krx0fmnzmlbn64dw23c4d6pz46ynjzrn9k8zyassdd0x";
type = "gem";
};
version = "2.1.2";
};
lockfile = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0dij3ijywylvfgrpi2i0k17f6w0wjhnjjw0k9030f54z56cz7jrr";
type = "gem";
};
version = "2.1.3";
};
mime-types = {
dependencies = ["mime-types-data"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0fjxy1jm52ixpnv3vg9ld9pr9f35gy0jp66i1njhqjvmnvq0iwwk";
type = "gem";
};
version = "3.2.2";
};
mime-types-data = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1m00pg19cm47n1qlcxgl91ajh2yq0fszvn1vy8fy0s1jkrp9fw4a";
type = "gem";
};
version = "3.2019.0331";
};
mini_portile2 = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "15zplpfw3knqifj9bpf604rb3wc1vhq6363pd6lvhayng8wql5vy";
type = "gem";
};
version = "2.4.0";
};
ncursesw = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1nc14wls1yiigz593vw7580hb99lf4n485axapiz6sqpg1jnlhcr";
type = "gem";
};
version = "1.4.10";
};
rake = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1sy5a7nh6xjdc9yhcw31jji7ssrf9v5806hn95gbrzr998a2ydjn";
type = "gem";
};
version = "12.3.2";
};
rmail-sup = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1xswk101s560lxqaax3plqh8vjx7jjspnggdwb3q80m358f92q9g";
type = "gem";
};
version = "1.0.1";
};
sup = {
dependencies = ["chronic" "highline" "locale" "lockfile" "mime-types" "ncursesw" "rmail-sup" "trollop" "unicode"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "17s2sxismf46zdhgr6g2v53fw9f3sp1ijx7xdw3wx8qpcsgazcgi";
type = "gem";
};
version = "0.22.1";
};
trollop = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "074h7lns72kg1dl5gvz5apl3xz1i0axbnbc01pf2kbw4q0lkpnp4";
type = "gem";
};
version = "2.9.9";
};
unicode = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1v8kxmq9i85agjpl7pnl72688901xhs8wxhmj6lpy16a8xz3nzxk";
type = "gem";
};
version = "0.4.4.4";
};
xapian-ruby = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1xbarnxmhy6r0rxpspn4wk85j183w6b18nah73djcs06b3gfas15";
type = "gem";
};
version = "1.2.22";
};
}

@ -415,6 +415,7 @@ in
sup = attrs: {
dontBuild = false;
# prevent sup from trying to dynamically install `xapian-ruby`.
nativeBuildInputs = [ rake ];
postPatch = ''
cp ${./mkrf_conf_xapian.rb} ext/mkrf_conf_xapian.rb
@ -484,7 +485,7 @@ in
xapian-ruby = attrs: {
# use the system xapian
dontBuild = false;
nativeBuildInputs = [ pkgconfig ];
nativeBuildInputs = [ rake pkgconfig ];
buildInputs = [ xapian_1_2_22 zlib ];
postPatch = ''
cp ${./xapian-Rakefile} Rakefile

@ -4,35 +4,30 @@ require 'rbconfig'
c = RbConfig::CONFIG
def system!(cmd)
puts cmd
system(cmd) or raise
end
source_dir = 'xapian_source'
bindings = Dir["#{source_dir}/xapian-bindings-*"].first
bindings = File.basename(bindings, ".tar.xz")
task :default do
system! "tar -xJf #{source_dir}/#{bindings}.tar.xz"
sh "tar -xJf #{source_dir}/#{bindings}.tar.xz"
prefix = Dir.pwd
ENV['LDFLAGS'] = "-L#{prefix}/lib"
system! "mkdir -p lib"
sh "mkdir -p lib"
Dir.chdir bindings do
ENV['RUBY'] ||= "#{c['bindir']}/#{c['RUBY_INSTALL_NAME']}"
system! "./configure --prefix=#{prefix} --exec-prefix=#{prefix} --with-ruby"
system! "make clean all"
sh "./configure --prefix=#{prefix} --exec-prefix=#{prefix} --with-ruby"
sh "make clean all"
end
system! "cp -r #{bindings}/ruby/.libs/_xapian.* lib"
system! "cp #{bindings}/ruby/xapian.rb lib"
sh "cp -r #{bindings}/ruby/.libs/_xapian.* lib"
sh "cp #{bindings}/ruby/xapian.rb lib"
system! "rm lib/*.la"
system! "rm lib/*.lai"
sh "rm lib/*.la"
sh "rm lib/*.lai"
system! "rm -R #{bindings}"
system! "rm -R #{source_dir}"
sh "rm -R #{bindings}"
sh "rm -R #{source_dir}"
end

@ -18977,7 +18977,9 @@ in
speedread = callPackage ../applications/misc/speedread { };
sup = callPackage ../applications/networking/mailreaders/sup {
ruby = ruby_2_3.override { cursesSupport = true; };
bundlerApp = bundlerApp.override{
ruby = ruby.override { cursesSupport = true; };
};
};
synapse = callPackage ../applications/misc/synapse { };