mikutter: 4.0.0 -> 4.1.4 (#119454)

This commit is contained in:
midchildan 2021-04-18 02:17:13 +09:00 committed by GitHub
parent ebcf1f92fe
commit 62806df678
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 345 additions and 218 deletions

View file

@ -1,82 +1,160 @@
{ lib, stdenv, fetchurl { lib
, bundlerEnv, ruby , stdenv
, alsaUtils, libnotify, which, wrapGAppsHook, gtk2, atk, gobject-introspection , fetchurl
, bundlerEnv
, alsaUtils
, atk
, copyDesktopItems
, gobject-introspection
, gtk2
, ruby
, libicns
, libnotify
, makeDesktopItem
, which
, wrapGAppsHook
, writeText
}: }:
# how to update: let
# find latest version at: http://mikutter.hachune.net/download#download # NOTE: $out may have different values depending on context
# run these commands: mikutterPaths = rec {
# optPrefixDir = "$out/opt/mikutter";
# wget http://mikutter.hachune.net/bin/mikutter.4.0.0.tar.gz appPrefixDir = "$out/Applications/mikutter.app/Contents";
# mkdir mikutter appBinDir = "${appPrefixDir}/MacOS";
# cd mikutter appResourceDir = "${appPrefixDir}/Resources";
# tar xvf ../mikutter.4.0.0.tar.gz iconPath = "${optPrefixDir}/core/skin/data/icon.png";
# find . -not -name Gemfile -exec rm {} \;
# find . -type d -exec rmdir -p --ignore-fail-on-non-empty {} \;
# cd ..
# mv mikutter/* .
# rm mikutter.4.0.0.tar.gz
# rm gemset.nix Gemfile.lock; nix-shell -p bundler bundix --run 'bundle lock && bundix'
stdenv.mkDerivation rec {
pname = "mikutter";
version = "4.0.0";
src = fetchurl {
url = "https://mikutter.hachune.net/bin/mikutter.${version}.tar.gz";
sha256 = "0nx14vlp7p69m2vw0s6kbiyymsfq0r2jd4nm0v5c4xb9avkpgc8g";
}; };
buildInputs = [ alsaUtils libnotify which gtk2 ruby atk gobject-introspection ]; gems = bundlerEnv {
nativeBuildInputs = [ wrapGAppsHook ]; name = "mikutter-gems"; # leave the version out to enable package reuse
gemdir = ./deps;
groups = [ "default" "plugin" ];
inherit ruby;
unpackPhase = '' # Avoid the following error:
mkdir source # > `<module:Moneta>': uninitialized constant Moneta::Builder (NameError)
cd source #
unpackFile $src # Related:
# https://github.com/NixOS/nixpkgs/pull/76510
# https://github.com/NixOS/nixpkgs/pull/76765
# https://github.com/NixOS/nixpkgs/issues/83442
# https://github.com/NixOS/nixpkgs/issues/106545
copyGemFiles = true;
};
mkDesktopItem = { description }:
makeDesktopItem {
name = "mikutter";
desktopName = "mikutter";
exec = "mikutter";
icon = "mikutter";
categories = "Network;";
comment = description;
extraDesktopEntries.Keywords = "Mastodon;";
};
mkInfoPlist = { version }:
writeText "Info.plist" (lib.generators.toPlist { } {
CFBundleName = "mikutter";
CFBundleDisplayName = "mikutter";
CFBundleExecutable = "mikutter";
CFBundleIconFile = "mikutter";
CFBundleIdentifier = "net.hachune.mikutter";
CFBundleInfoDictionaryVersion = "6.0";
CFBundlePackageType = "APPL";
CFBundleVersion = version;
CFBundleShortVersionString = version;
});
inherit (gems) wrappedRuby;
in
with mikutterPaths; stdenv.mkDerivation rec {
pname = "mikutter";
version = "4.1.4";
src = fetchurl {
url = "https://mikutter.hachune.net/bin/mikutter-${version}.tar.gz";
sha256 = "05253nz4i1lmnq6czj48qdab2ny4vx2mznj6nsn2l1m2z6zqkwk3";
};
nativeBuildInputs = [ copyDesktopItems wrapGAppsHook ]
++ lib.optionals stdenv.isDarwin [ libicns ];
buildInputs = [
atk
gtk2
gobject-introspection
libnotify
which # some plugins use it at runtime
wrappedRuby
] ++ lib.optionals stdenv.isLinux [ alsaUtils ];
scriptPath = lib.makeBinPath (
[ wrappedRuby libnotify which ]
++ lib.optionals stdenv.isLinux [ alsaUtils ]
);
postUnpack = ''
rm -rf vendor rm -rf vendor
''; '';
installPhase = let installPhase = ''
env = bundlerEnv { runHook preInstall
name = "mikutter-${version}-gems";
gemdir = ./.;
inherit ruby; mkdir -p $out/bin ${optPrefixDir}
};
in ''
install -v -D -m644 README $out/share/doc/mikutter/README
install -v -D -m644 LICENSE $out/share/doc/mikutter/LICENSE
rm -v README LICENSE
cp -rv . $out install -Dm644 README $out/share/doc/mikutter/README
mkdir $out/bin/ install -Dm644 LICENSE $out/share/doc/mikutter/LICENSE
# hack wrapGAppsHook wants a file not a symlink rm -r README LICENSE deployment
mv $out/mikutter.rb $out/bin/mikutter
gappsWrapperArgs+=( cp -r . ${optPrefixDir}
--prefix PATH : "${ruby}/bin:${alsaUtils}/bin:${libnotify}/bin"
--prefix GEM_HOME : "${env}/${env.ruby.gemPath}" gappsWrapperArgsHook # FIXME: currently runs at preFixup
wrapGApp ${optPrefixDir}/mikutter.rb \
--prefix PATH : "${scriptPath}" \
--set DISABLE_BUNDLER_SETUP 1 --set DISABLE_BUNDLER_SETUP 1
) mv ${optPrefixDir}/mikutter.rb $out/bin/mikutter
# --prefix GIO_EXTRA_MODULES : "$prefix/lib/gio/modules"
mkdir -p $out/share/mikutter $out/share/applications install -Dm644 ${iconPath} $out/share/icons/hicolor/256x256/apps/mikutter.png
ln -sv $out/core/skin $out/share/mikutter/skin
substituteAll ${./mikutter.desktop} $out/share/applications/mikutter.desktop runHook postInstall
''; '';
postFixup = '' postInstall =
mv $out/bin/.mikutter-wrapped $out/mikutter.rb let
substituteInPlace $out/bin/mikutter \ infoPlist = mkInfoPlist { inherit version; };
--replace "$out/bin/.mikutter-wrapped" "$out/mikutter.rb" in
lib.optionalString stdenv.isDarwin ''
mkdir -p ${appBinDir} ${appResourceDir}
install -Dm644 ${infoPlist} ${appPrefixDir}/Info.plist
ln -s $out/bin/mikutter ${appBinDir}/mikutter
png2icns ${appResourceDir}/mikutter.icns ${iconPath}
'';
installCheckPhase = ''
runHook preInstallCheck
testDir="$(mktemp -d)"
install -Dm644 ${./test_plugin.rb} "$testDir/plugin/test_plugin/test_plugin.rb"
$out/bin/mikutter --confroot="$testDir" --plugin=test_plugin --debug
runHook postInstallCheck
''; '';
desktopItems = [
(mkDesktopItem { inherit (meta) description; })
];
doInstallCheck = true;
dontWrapGApps = true; # the target is placed outside of bin/
passthru.updateScript = [ ./update.sh version (toString ./.) ];
meta = with lib; { meta = with lib; {
description = "An extensible Twitter client"; description = "An extensible Mastodon client";
homepage = "https://mikutter.hachune.net"; homepage = "https://mikutter.hachune.net";
platforms = ruby.meta.platforms; platforms = ruby.meta.platforms;
license = licenses.mit; license = licenses.mit;
broken = true;
}; };
} }

View file

@ -11,12 +11,12 @@ ruby '>= 2.5.0'
group :default do group :default do
gem 'addressable','>= 2.7.0', '< 2.8' gem 'addressable','>= 2.7.0', '< 2.8'
gem 'delayer','>= 1.0.1', '< 1.1' gem 'delayer','>= 1.1.2', '< 2.0'
gem 'delayer-deferred','>= 2.1.1', '< 2.2' gem 'delayer-deferred','>= 2.2.0', '< 3.0'
gem 'diva','>= 1.0.1', '< 1.1' gem 'diva','>= 1.0.2', '< 2.0'
gem 'memoist','>= 0.16.2', '< 0.17' gem 'memoist','>= 0.16.2', '< 0.17'
gem 'oauth','>= 0.5.4' gem 'oauth','>= 0.5.4'
gem 'pluggaloid','>= 1.2.0', '< 1.3' gem 'pluggaloid','>= 1.5.0', '< 2.0'
gem 'typed-array','>= 0.1.2', '< 0.2' gem 'typed-array','>= 0.1.2', '< 0.2'
end end

View file

@ -5,22 +5,23 @@ GEM
public_suffix (>= 2.0.2, < 5.0) public_suffix (>= 2.0.2, < 5.0)
atk (3.4.1) atk (3.4.1)
glib2 (= 3.4.1) glib2 (= 3.4.1)
cairo (1.16.4) cairo (1.17.5)
native-package-installer (>= 1.0.3) native-package-installer (>= 1.0.3)
pkg-config (>= 1.2.2) pkg-config (>= 1.2.2)
red-colors
cairo-gobject (3.4.1) cairo-gobject (3.4.1)
cairo (>= 1.16.2) cairo (>= 1.16.2)
glib2 (= 3.4.1) glib2 (= 3.4.1)
crack (0.4.3) crack (0.4.5)
safe_yaml (~> 1.0.0) rexml
delayer (1.0.1) delayer (1.2.0)
delayer-deferred (2.1.1) delayer-deferred (2.2.0)
delayer (>= 1.0, < 2.0) delayer (>= 1.1.2, < 2.0)
diva (1.0.1) diva (1.0.2)
addressable (>= 2.5.2, < 2.8) addressable (>= 2.5.2, < 2.8)
gdk_pixbuf2 (3.4.1) gdk_pixbuf2 (3.4.1)
gio2 (= 3.4.1) gio2 (= 3.4.1)
gettext (3.2.9) gettext (3.3.7)
locale (>= 2.0.5) locale (>= 2.0.5)
text (>= 1.3.0) text (>= 1.3.0)
gio2 (3.4.1) gio2 (3.4.1)
@ -34,40 +35,38 @@ GEM
atk (= 3.4.1) atk (= 3.4.1)
gdk_pixbuf2 (= 3.4.1) gdk_pixbuf2 (= 3.4.1)
pango (= 3.4.1) pango (= 3.4.1)
hashdiff (1.0.0) hashdiff (1.0.1)
httpclient (2.8.3) httpclient (2.8.3)
instance_storage (1.0.0) instance_storage (1.0.0)
io-console (0.5.3) locale (2.1.3)
irb (1.2.1)
reline (>= 0.0.1)
locale (2.1.2)
memoist (0.16.2) memoist (0.16.2)
mini_portile2 (2.4.0) mini_portile2 (2.5.0)
mocha (1.11.1) mocha (1.12.0)
moneta (1.2.1) moneta (1.4.1)
native-package-installer (1.0.9) native-package-installer (1.1.1)
nokogiri (1.10.7) nokogiri (1.11.3)
mini_portile2 (~> 2.4.0) mini_portile2 (~> 2.5.0)
oauth (0.5.4) racc (~> 1.4)
oauth (0.5.6)
pango (3.4.1) pango (3.4.1)
cairo-gobject (= 3.4.1) cairo-gobject (= 3.4.1)
gobject-introspection (= 3.4.1) gobject-introspection (= 3.4.1)
pkg-config (1.4.0) pkg-config (1.4.6)
pluggaloid (1.2.0) pluggaloid (1.5.0)
delayer (>= 1.0.0, < 2.0) delayer (>= 1.1.0, < 2.0)
instance_storage (>= 1.0.0, < 2.0.0) instance_storage (>= 1.0.0, < 2.0.0)
power_assert (1.1.5) power_assert (2.0.0)
public_suffix (4.0.1) public_suffix (4.0.6)
rake (13.0.1) racc (1.5.2)
reline (0.1.2) rake (13.0.3)
io-console (~> 0.5) red-colors (0.1.1)
ruby-prof (1.1.0) rexml (3.2.5)
safe_yaml (1.0.5) ruby-prof (1.4.3)
test-unit (3.3.4) test-unit (3.4.0)
power_assert power_assert
text (1.3.1) text (1.3.1)
typed-array (0.1.2) typed-array (0.1.2)
webmock (3.7.6) webmock (3.12.2)
addressable (>= 2.3.6) addressable (>= 2.3.6)
crack (>= 0.3.2) crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0) hashdiff (>= 0.4.0, < 2.0.0)
@ -77,19 +76,18 @@ PLATFORMS
DEPENDENCIES DEPENDENCIES
addressable (>= 2.7.0, < 2.8) addressable (>= 2.7.0, < 2.8)
delayer (>= 1.0.1, < 1.1) delayer (>= 1.1.2, < 2.0)
delayer-deferred (>= 2.1.1, < 2.2) delayer-deferred (>= 2.2.0, < 3.0)
diva (>= 1.0.1, < 1.1) diva (>= 1.0.2, < 2.0)
gettext (>= 3.2.9, < 3.3) gettext (>= 3.3.5, < 3.4)
gtk2 (= 3.4.1) gtk2 (= 3.4.1)
httpclient httpclient
irb (>= 1.2.0, < 1.3)
memoist (>= 0.16.2, < 0.17) memoist (>= 0.16.2, < 0.17)
mocha (>= 1.11.1) mocha (>= 1.11.1)
moneta moneta
nokogiri nokogiri
oauth (>= 0.5.4) oauth (>= 0.5.4)
pluggaloid (>= 1.2.0, < 1.3) pluggaloid (>= 1.5.0, < 2.0)
rake (>= 13.0.1) rake (>= 13.0.1)
ruby-prof (>= 1.1.0) ruby-prof (>= 1.1.0)
test-unit (>= 3.3.4, < 4.0) test-unit (>= 3.3.4, < 4.0)
@ -97,7 +95,7 @@ DEPENDENCIES
webmock (>= 3.7.6) webmock (>= 3.7.6)
RUBY VERSION RUBY VERSION
ruby 2.7.0p0 ruby 2.6.6p146
BUNDLED WITH BUNDLED WITH
2.1.2 2.1.4

View file

@ -22,15 +22,15 @@
version = "3.4.1"; version = "3.4.1";
}; };
cairo = { cairo = {
dependencies = ["native-package-installer" "pkg-config"]; dependencies = ["native-package-installer" "pkg-config" "red-colors"];
groups = ["default" "plugin"]; groups = ["default" "plugin"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "0yvv2lcbsybzbw1nrmfivmln23da4rndrs3av6ymjh0x3ww5h7p8"; sha256 = "0vbj9szp2xbnxqan8hppip8vm9fxpcmpx745y5fvg2scdh9f0p7s";
type = "gem"; type = "gem";
}; };
version = "1.16.4"; version = "1.17.5";
}; };
cairo-gobject = { cairo-gobject = {
dependencies = ["cairo" "glib2"]; dependencies = ["cairo" "glib2"];
@ -44,25 +44,25 @@
version = "3.4.1"; version = "3.4.1";
}; };
crack = { crack = {
dependencies = ["safe_yaml"]; dependencies = ["rexml"];
groups = ["default" "test"]; groups = ["default" "test"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "0abb0fvgw00akyik1zxnq7yv391va148151qxdghnzngv66bl62k"; sha256 = "1cr1kfpw3vkhysvkk3wg7c54m75kd68mbm9rs5azdjdq57xid13r";
type = "gem"; type = "gem";
}; };
version = "0.4.3"; version = "0.4.5";
}; };
delayer = { delayer = {
groups = ["default"]; groups = ["default"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "09p4rkh3dpdm1mhq721m4d6zvxqqp44kg7069s8l7kmaf7nv2nb3"; sha256 = "0iqf4i18i8rk3x7qgvkhbiqskf0xzdf733fjimrq6xkag2mq60bl";
type = "gem"; type = "gem";
}; };
version = "1.0.1"; version = "1.2.0";
}; };
delayer-deferred = { delayer-deferred = {
dependencies = ["delayer"]; dependencies = ["delayer"];
@ -70,10 +70,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "1mbdxn1hskjqf3zlj4waxl71ccvbj6lk81c99769paxw4fajwrgx"; sha256 = "0i2das3ncssacpqdgaf4as77vrxm7jfiizaja884fqv4rzv6s2sv";
type = "gem"; type = "gem";
}; };
version = "2.1.1"; version = "2.2.0";
}; };
diva = { diva = {
dependencies = ["addressable"]; dependencies = ["addressable"];
@ -81,10 +81,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "182gws1zihhpl7r3m8jsf29maqg9xdhj46s9lidbldar8clpl23h"; sha256 = "05wl4wg57vvng4nrp4lzjq148v908xzq092kq93phwvyxs7jnw2g";
type = "gem"; type = "gem";
}; };
version = "1.0.1"; version = "1.0.2";
}; };
gdk_pixbuf2 = { gdk_pixbuf2 = {
dependencies = ["gio2"]; dependencies = ["gio2"];
@ -103,10 +103,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "0764vj7gacn0aypm2bf6m46dzjzwzrjlmbyx6qwwwzbmi94r40wr"; sha256 = "1fqlwq7i8ck1fjyhn19q3skvgrbz44q7gq51mlr0qym5rkj5f6rn";
type = "gem"; type = "gem";
}; };
version = "3.2.9"; version = "3.3.7";
}; };
gio2 = { gio2 = {
dependencies = ["gobject-introspection"]; dependencies = ["gobject-introspection"];
@ -157,10 +157,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "18jqpbvidrlnq3xf0hkdbs00607jgz35lry6gjw4bcxgh52am2mk"; sha256 = "1nynpl0xbj0nphqx1qlmyggq58ms1phf5i03hk64wcc0a17x1m1c";
type = "gem"; type = "gem";
}; };
version = "1.0.0"; version = "1.0.1";
}; };
httpclient = { httpclient = {
groups = ["plugin"]; groups = ["plugin"];
@ -182,36 +182,15 @@
}; };
version = "1.0.0"; version = "1.0.0";
}; };
io-console = {
groups = ["default" "plugin"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0srn91ly4cc5qvyj3r87sc7v8dnm52qj1hczzxmysib6ffparngd";
type = "gem";
};
version = "0.5.3";
};
irb = {
dependencies = ["reline"];
groups = ["default" "plugin"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1r1y8i46qd5izdszzzn5jxvwvq00m89rk0hm8cs8f21p7nlwmh5w";
type = "gem";
};
version = "1.2.1";
};
locale = { locale = {
groups = ["default" "plugin"]; groups = ["default" "plugin"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "1sls9bq4krx0fmnzmlbn64dw23c4d6pz46ynjzrn9k8zyassdd0x"; sha256 = "0997465kxvpxm92fiwc2b16l49mngk7b68g5k35ify0m3q0yxpdn";
type = "gem"; type = "gem";
}; };
version = "2.1.2"; version = "2.1.3";
}; };
memoist = { memoist = {
groups = ["default"]; groups = ["default"];
@ -228,61 +207,61 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "15zplpfw3knqifj9bpf604rb3wc1vhq6363pd6lvhayng8wql5vy"; sha256 = "1hdbpmamx8js53yk3h8cqy12kgv6ca06k0c9n3pxh6b6cjfs19x7";
type = "gem"; type = "gem";
}; };
version = "2.4.0"; version = "2.5.0";
}; };
mocha = { mocha = {
groups = ["test"]; groups = ["test"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "06i2q5qjr9mvjgjc8w41pdf3qalw340y33wjvzc0rp4a1cbbb7pp"; sha256 = "05yw6rwgjppq116jgqfg4pv4bql3ci4r2fmmg0m2c3sqib1bq41a";
type = "gem"; type = "gem";
}; };
version = "1.11.1"; version = "1.12.0";
}; };
moneta = { moneta = {
groups = ["plugin"]; groups = ["plugin"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "0q7fskfdc0h5dhl8aamg3ypybd6cyl4x0prh4803gj7hxr17jfm1"; sha256 = "0z25b4yysvnf2hi9jxnsiv3fvnicnzr2m70ci231av5093jfknc6";
type = "gem"; type = "gem";
}; };
version = "1.2.1"; version = "1.4.1";
}; };
native-package-installer = { native-package-installer = {
groups = ["default" "plugin"]; groups = ["default" "plugin"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "0piclgf6pw7hr10x57x0hn675djyna4sb3xc97yb9vh66wkx1fl0"; sha256 = "1ww1mq41q7rda975byjmq5dk8k13v8dawvm33370pbkrymd8syp8";
type = "gem"; type = "gem";
}; };
version = "1.0.9"; version = "1.1.1";
}; };
nokogiri = { nokogiri = {
dependencies = ["mini_portile2"]; dependencies = ["mini_portile2" "racc"];
groups = ["plugin"]; groups = ["plugin"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "0r0qpgf80h764k176yr63gqbs2z0xbsp8vlvs2a79d5r9vs83kln"; sha256 = "19d78mdg2lbz9jb4ph6nk783c9jbsdm8rnllwhga6pd53xffp6x0";
type = "gem"; type = "gem";
}; };
version = "1.10.7"; version = "1.11.3";
}; };
oauth = { oauth = {
groups = ["default"]; groups = ["default"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "1zszdg8q1b135z7l7crjj234k4j0m347hywp5kj6zsq7q78pw09y"; sha256 = "1zwd6v39yqfdrpg1p3d9jvzs9ljg55ana2p06m0l7qn5w0lgx1a0";
type = "gem"; type = "gem";
}; };
version = "0.5.4"; version = "0.5.6";
}; };
pango = { pango = {
dependencies = ["cairo-gobject" "gobject-introspection"]; dependencies = ["cairo-gobject" "gobject-introspection"];
@ -300,10 +279,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "1cxdpr2wlz9b587avlq04a1da5fz1vdw8jvr6lx23mcq7mqh2xcx"; sha256 = "1mjjy1grxr64znkffxsvprcckbrrnm40b6gbllnbm7jxslbr3gjl";
type = "gem"; type = "gem";
}; };
version = "1.4.0"; version = "1.4.6";
}; };
pluggaloid = { pluggaloid = {
dependencies = ["delayer" "instance_storage"]; dependencies = ["delayer" "instance_storage"];
@ -311,71 +290,80 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "1gv0rjjdic8c41gfr3kyyphvf0fmv5rzcf6qd57zjdfcn6fvi3hh"; sha256 = "0m3f940lf1bg01jin22by7hg9hs43y995isgcyqb6vbvlv51zj11";
type = "gem"; type = "gem";
}; };
version = "1.2.0"; version = "1.5.0";
}; };
power_assert = { power_assert = {
groups = ["default" "test"]; groups = ["default" "test"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "1dii0wkfa0jm8sk9b20zl1z4980dmrjh0zqnii058485pp3ws10s"; sha256 = "172qfmzwxdf82bmwgcb13hnz9i3p6i2s2nijxnx6r63kn3drjppr";
type = "gem"; type = "gem";
}; };
version = "1.1.5"; version = "2.0.0";
}; };
public_suffix = { public_suffix = {
groups = ["default" "test"]; groups = ["default" "test"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "0xnfv2j2bqgdpg2yq9i2rxby0w2sc9h5iyjkpaas2xknwrgmhdb0"; sha256 = "1xqcgkl7bwws1qrlnmxgh8g4g9m10vg60bhlw40fplninb3ng6d9";
type = "gem"; type = "gem";
}; };
version = "4.0.1"; version = "4.0.6";
};
racc = {
groups = ["default" "plugin"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "178k7r0xn689spviqzhvazzvxfq6fyjldxb3ywjbgipbfi4s8j1g";
type = "gem";
};
version = "1.5.2";
}; };
rake = { rake = {
groups = ["test"]; groups = ["test"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "0w6qza25bq1s825faaglkx1k6d59aiyjjk3yw3ip5sb463mhhai9"; sha256 = "1iik52mf9ky4cgs38fp2m8r6skdkq1yz23vh18lk95fhbcxb6a67";
type = "gem"; type = "gem";
}; };
version = "13.0.1"; version = "13.0.3";
}; };
reline = { red-colors = {
dependencies = ["io-console"];
groups = ["default" "plugin"]; groups = ["default" "plugin"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "0908ijrngc3wkn5iny7d0kxkp74w6ixk2nwzzngplplfla1vkp8x"; sha256 = "0ar2k7zvhr1215jx5di29hkg5h1798f1gypmq6v0sy9v35w6ijca";
type = "gem"; type = "gem";
}; };
version = "0.1.2"; version = "0.1.1";
};
rexml = {
groups = ["default" "test"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "08ximcyfjy94pm1rhcx04ny1vx2sk0x4y185gzn86yfsbzwkng53";
type = "gem";
};
version = "3.2.5";
}; };
ruby-prof = { ruby-prof = {
groups = ["test"]; groups = ["test"];
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "18ga5f4h1fnwn0xh910kpnw4cg3lq3jqljd3h16bdw9pgc5ff7dn"; sha256 = "1r3xalp91l07m0cwllcxjzg6nkviiqnxkcbgg5qnzsdji6rgy65m";
type = "gem"; type = "gem";
}; };
version = "1.1.0"; version = "1.4.3";
};
safe_yaml = {
groups = ["default" "test"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0j7qv63p0vqcd838i2iy2f76c3dgwzkiz1d1xkg7n0pbnxj2vb56";
type = "gem";
};
version = "1.0.5";
}; };
test-unit = { test-unit = {
dependencies = ["power_assert"]; dependencies = ["power_assert"];
@ -383,10 +371,10 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "0mrkpb6wz0cs1740kaca240k4ymmkbvb2v5xaxsy6vynqw8n0g6z"; sha256 = "1h0c323zfn4hdida4g58h8wnlh4kax438gyxlw20dd78kcp01i8m";
type = "gem"; type = "gem";
}; };
version = "3.3.4"; version = "3.4.0";
}; };
text = { text = {
groups = ["default" "plugin"]; groups = ["default" "plugin"];
@ -414,9 +402,9 @@
platforms = []; platforms = [];
source = { source = {
remotes = ["https://rubygems.org"]; remotes = ["https://rubygems.org"];
sha256 = "19xvs7gdf8r75bmyb17w9g367qxzqnlrmbdda1y36cn1vrlnf2l8"; sha256 = "038igpmkpmn0nw0k7s4db8x88af1nwcy7wzh9m9c9q4p74h7rii0";
type = "gem"; type = "gem";
}; };
version = "3.7.6"; version = "3.12.2";
}; };
} }

View file

@ -0,0 +1,5 @@
source 'https://rubygems.org'
group :default do
gem 'gettext', '>= 3.3.5', '< 3.4'
end

View file

@ -1,9 +0,0 @@
[Desktop Entry]
Name=mikutter
Comment=Twitter Client
Type=Application
Exec=@out@/bin/mikutter
Icon=@out@/core/skin/data/icon.png
Terminal=false
Categories=Network;
Keywords=Twitter;

View file

@ -1,6 +0,0 @@
source 'https://rubygems.org'
group :default do
gem 'gettext', '>= 3.2.9', '< 3.3'
gem 'irb', '>= 1.2.0', '< 1.3'
end

View file

@ -0,0 +1,10 @@
# Tests mikutter's event system.
Plugin.create(:test_plugin) do
require 'logger'
Delayer.new do
log = Logger.new(STDOUT)
log.info("loaded test_plugin")
exit
end
end

View file

@ -0,0 +1,51 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p bundler bundix curl jq common-updater-scripts
# shellcheck shell=bash
set -euo pipefail
main() {
local currentVer="$1"
local scriptDir="$2"
local latestVer
local srcDir
if [[ -z "$UPDATE_NIX_ATTR_PATH" ]]; then
echo "[ERROR] Please run the following instead:" >&2
echo >&2
echo " % nix-shell maintainers/scripts/update.nix --argstr path mikutter" >&2
exit 1
fi
latestVer="$(queryLatestVersion)"
if [[ "$currentVer" == "$latestVer" ]]; then
echo "[INFO] mikutter is already up to date" >&2
exit
fi
update-source-version "$UPDATE_NIX_ATTR_PATH" "$latestVer"
cd "$scriptDir"
rm -rf deps
mkdir deps
cd deps
srcDir="$(nix-build ../../../../../.. --no-out-link -A mikutter.src)"
tar xvf "$srcDir" --strip-components=1
find . -not -name Gemfile -exec rm {} \;
find . -type d -exec rmdir -p --ignore-fail-on-non-empty {} \; || true
bundle lock
bundix
}
queryLatestVersion() {
curl -sS 'https://mikutter.hachune.net/download.json?count=1' \
| jq -r '.[].version_string' \
| head -n1
}
main "$@"
# vim:set ft=bash:

View file

@ -20,12 +20,13 @@
{ lib, fetchurl, writeScript, ruby, libkrb5, libxml2, libxslt, python, stdenv, which { lib, fetchurl, writeScript, ruby, libkrb5, libxml2, libxslt, python, stdenv, which
, libiconv, postgresql, v8, clang, sqlite, zlib, imagemagick, lasem , libiconv, postgresql, v8, clang, sqlite, zlib, imagemagick, lasem
, pkg-config , ncurses, xapian, gpgme, util-linux, tzdata, icu, libffi , pkg-config , ncurses, xapian, gpgme, util-linux, tzdata, icu, libffi
, cmake, libssh2, openssl, libmysqlclient, darwin, git, perl, pcre, gecode_3, curl , cmake, libssh2, openssl, libmysqlclient, git, perl, pcre, gecode_3, curl
, msgpack, libsodium, snappy, libossp_uuid, lxc, libpcap, xorg, gtk2, buildRubyGem , msgpack, libsodium, snappy, libossp_uuid, lxc, libpcap, xorg, gtk2, buildRubyGem
, cairo, re2, rake, gobject-introspection, gdk-pixbuf, zeromq, czmq, graphicsmagick, libcxx , cairo, re2, rake, gobject-introspection, gdk-pixbuf, zeromq, czmq, graphicsmagick, libcxx
, file, libvirt, glib, vips, taglib, libopus, linux-pam, libidn, protobuf, fribidi, harfbuzz , file, libvirt, glib, vips, taglib, libopus, linux-pam, libidn, protobuf, fribidi, harfbuzz
, bison, flex, pango, python3, patchelf, binutils, freetds, wrapGAppsHook, atk , bison, flex, pango, python3, patchelf, binutils, freetds, wrapGAppsHook, atk
, bundler, libsass, libselinux ? null, libsepol ? null, shared-mime-info , bundler, libsass, libselinux, libsepol, shared-mime-info, libthai, libdatrie
, CoreServices, DarwinTools, cctools
}@args: }@args:
let let
@ -41,7 +42,8 @@ in
{ {
atk = attrs: { atk = attrs: {
dependencies = attrs.dependencies ++ [ "gobject-introspection" ]; dependencies = attrs.dependencies ++ [ "gobject-introspection" ];
nativeBuildInputs = [ rake bundler pkg-config ]; nativeBuildInputs = [ rake bundler pkg-config ]
++ lib.optionals stdenv.isDarwin [ DarwinTools ];
propagatedBuildInputs = [ gobject-introspection wrapGAppsHook atk ]; propagatedBuildInputs = [ gobject-introspection wrapGAppsHook atk ];
}; };
@ -61,12 +63,14 @@ in
}; };
cairo = attrs: { cairo = attrs: {
nativeBuildInputs = [ pkg-config ]; nativeBuildInputs = [ pkg-config ]
++ lib.optionals stdenv.isDarwin [ DarwinTools ];
buildInputs = [ gtk2 pcre xorg.libpthreadstubs xorg.libXdmcp]; buildInputs = [ gtk2 pcre xorg.libpthreadstubs xorg.libXdmcp];
}; };
cairo-gobject = attrs: { cairo-gobject = attrs: {
nativeBuildInputs = [ pkg-config ]; nativeBuildInputs = [ pkg-config ]
++ lib.optionals stdenv.isDarwin [ DarwinTools ];
buildInputs = [ cairo pcre xorg.libpthreadstubs xorg.libXdmcp ]; buildInputs = [ cairo pcre xorg.libpthreadstubs xorg.libXdmcp ];
}; };
@ -189,7 +193,8 @@ in
}; };
gdk_pixbuf2 = attrs: { gdk_pixbuf2 = attrs: {
nativeBuildInputs = [ pkg-config bundler rake ]; nativeBuildInputs = [ pkg-config bundler rake ]
++ lib.optionals stdenv.isDarwin [ DarwinTools ];
propagatedBuildInputs = [ gobject-introspection wrapGAppsHook gdk-pixbuf ]; propagatedBuildInputs = [ gobject-introspection wrapGAppsHook gdk-pixbuf ];
}; };
@ -199,7 +204,8 @@ in
}; };
gio2 = attrs: { gio2 = attrs: {
nativeBuildInputs = [ pkg-config ]; nativeBuildInputs = [ pkg-config ]
++ lib.optionals stdenv.isDarwin [ DarwinTools ];
buildInputs = [ gtk2 pcre gobject-introspection ] ++ lib.optionals stdenv.isLinux [ util-linux libselinux libsepol ]; buildInputs = [ gtk2 pcre gobject-introspection ] ++ lib.optionals stdenv.isLinux [ util-linux libselinux libsepol ];
}; };
@ -235,7 +241,8 @@ in
}; };
glib2 = attrs: { glib2 = attrs: {
nativeBuildInputs = [ pkg-config ]; nativeBuildInputs = [ pkg-config ]
++ lib.optionals stdenv.isDarwin [ DarwinTools ];
buildInputs = [ gtk2 pcre ]; buildInputs = [ gtk2 pcre ];
}; };
@ -244,7 +251,7 @@ in
binutils pkg-config binutils pkg-config
] ++ lib.optionals stdenv.isLinux [ ] ++ lib.optionals stdenv.isLinux [
util-linux libselinux libsepol util-linux libselinux libsepol
]; ] ++ lib.optionals stdenv.isDarwin [ DarwinTools ];
propagatedBuildInputs = [ propagatedBuildInputs = [
atk atk
gdk-pixbuf gdk-pixbuf
@ -252,16 +259,18 @@ in
gobject-introspection gobject-introspection
gtk2 gtk2
harfbuzz harfbuzz
libdatrie
libthai
pcre pcre
xorg.libpthreadstubs xorg.libpthreadstubs
xorg.libXdmcp xorg.libXdmcp
]; ];
# CFLAGS must be set for this gem to detect gdkkeysyms.h correctly dontStrip = stdenv.isDarwin;
# CFLAGS = "-I${gtk2.dev}/include/gtk-2.0 -I/non-existent-path";
}; };
gobject-introspection = attrs: { gobject-introspection = attrs: {
nativeBuildInputs = [ pkg-config pcre ]; nativeBuildInputs = [ pkg-config pcre ]
++ lib.optionals stdenv.isDarwin [ DarwinTools ];
propagatedBuildInputs = [ gobject-introspection wrapGAppsHook glib ]; propagatedBuildInputs = [ gobject-introspection wrapGAppsHook glib ];
}; };
@ -287,9 +296,7 @@ in
}; };
hitimes = attrs: { hitimes = attrs: {
buildInputs = buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ];
lib.optionals stdenv.isDarwin
[ darwin.apple_sdk.frameworks.CoreServices ];
}; };
iconv = attrs: { iconv = attrs: {
@ -453,7 +460,9 @@ in
pcre pcre
xorg.libpthreadstubs xorg.libpthreadstubs
xorg.libXdmcp xorg.libXdmcp
]; ] ++ lib.optionals stdenv.isDarwin [ DarwinTools ];
buildInputs = [ libdatrie libthai ]
++ lib.optionals stdenv.isLinux [ libselinux libsepol util-linux ];
propagatedBuildInputs = [ gobject-introspection wrapGAppsHook gtk2 ]; propagatedBuildInputs = [ gobject-introspection wrapGAppsHook gtk2 ];
}; };
@ -661,7 +670,7 @@ in
}; };
zookeeper = attrs: { zookeeper = attrs: {
buildInputs = lib.optionals stdenv.isDarwin [ darwin.cctools ]; buildInputs = lib.optionals stdenv.isDarwin [ cctools ];
dontBuild = false; dontBuild = false;
postPatch = '' postPatch = ''
sed -i ext/extconf.rb -e "4a \ sed -i ext/extconf.rb -e "4a \

View file

@ -11986,7 +11986,10 @@ in
dust = callPackage ../development/interpreters/pixie/dust.nix { }; dust = callPackage ../development/interpreters/pixie/dust.nix { };
buildRubyGem = callPackage ../development/ruby-modules/gem { }; buildRubyGem = callPackage ../development/ruby-modules/gem { };
defaultGemConfig = callPackage ../development/ruby-modules/gem-config { }; defaultGemConfig = callPackage ../development/ruby-modules/gem-config {
inherit (darwin) DarwinTools cctools;
inherit (darwin.apple_sdk.frameworks) CoreServices;
};
bundix = callPackage ../development/ruby-modules/bundix { }; bundix = callPackage ../development/ruby-modules/bundix { };
bundler = callPackage ../development/ruby-modules/bundler { }; bundler = callPackage ../development/ruby-modules/bundler { };
bundlerEnv = callPackage ../development/ruby-modules/bundler-env { }; bundlerEnv = callPackage ../development/ruby-modules/bundler-env { };