2017-05-18 01:47:45 +01:00
|
|
|
{ stdenv, fetchurl
|
2018-07-21 01:44:44 +01:00
|
|
|
, bundlerEnv, ruby
|
2019-05-03 11:48:14 +01:00
|
|
|
, alsaUtils, libnotify, which, wrapGAppsHook, gtk2, atk, gobject-introspection
|
2017-05-18 01:47:45 +01:00
|
|
|
}:
|
|
|
|
|
2019-05-03 11:48:14 +01:00
|
|
|
# how to update:
|
|
|
|
# find latest version at: http://mikutter.hachune.net/download#download
|
|
|
|
# run these commands:
|
|
|
|
#
|
2019-12-25 15:57:58 +00:00
|
|
|
# wget http://mikutter.hachune.net/bin/mikutter.4.0.0.tar.gz
|
|
|
|
# mkdir mikutter
|
2019-05-03 11:48:14 +01:00
|
|
|
# cd mikutter
|
2019-12-25 15:57:58 +00:00
|
|
|
# tar xvf ../mikutter.4.0.0.tar.gz
|
2019-05-03 11:48:14 +01:00
|
|
|
# find . -not -name Gemfile -exec rm {} \;
|
|
|
|
# find . -type d -exec rmdir -p --ignore-fail-on-non-empty {} \;
|
|
|
|
# cd ..
|
|
|
|
# mv mikutter/* .
|
2019-12-25 15:57:58 +00:00
|
|
|
# rm mikutter.4.0.0.tar.gz
|
2019-05-03 11:48:14 +01:00
|
|
|
# rm gemset.nix Gemfile.lock; nix-shell -p bundler bundix --run 'bundle lock && bundix'
|
|
|
|
|
2017-05-18 01:47:45 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "mikutter";
|
2019-12-25 15:57:58 +00:00
|
|
|
version = "4.0.0";
|
2017-05-18 01:47:45 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://mikutter.hachune.net/bin/mikutter.${version}.tar.gz";
|
2019-12-25 15:57:58 +00:00
|
|
|
sha256 = "0nx14vlp7p69m2vw0s6kbiyymsfq0r2jd4nm0v5c4xb9avkpgc8g";
|
2017-05-18 01:47:45 +01:00
|
|
|
};
|
|
|
|
|
2019-05-03 11:48:14 +01:00
|
|
|
buildInputs = [ alsaUtils libnotify which gtk2 ruby atk gobject-introspection ];
|
2017-05-18 01:47:45 +01:00
|
|
|
nativeBuildInputs = [ wrapGAppsHook ];
|
|
|
|
|
2019-12-25 15:57:58 +00:00
|
|
|
unpackPhase = ''
|
|
|
|
mkdir source
|
|
|
|
cd source
|
|
|
|
unpackFile $src
|
|
|
|
rm -rf vendor
|
2017-05-18 01:47:45 +01:00
|
|
|
'';
|
|
|
|
|
2019-11-09 23:52:53 +00:00
|
|
|
installPhase = let
|
|
|
|
env = bundlerEnv {
|
|
|
|
name = "mikutter-${version}-gems";
|
|
|
|
gemdir = ./.;
|
|
|
|
|
|
|
|
inherit ruby;
|
|
|
|
};
|
|
|
|
in ''
|
2017-05-18 01:47:45 +01:00
|
|
|
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
|
|
|
|
mkdir $out/bin/
|
|
|
|
# hack wrapGAppsHook wants a file not a symlink
|
|
|
|
mv $out/mikutter.rb $out/bin/mikutter
|
|
|
|
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
--prefix PATH : "${ruby}/bin:${alsaUtils}/bin:${libnotify}/bin"
|
|
|
|
--prefix GEM_HOME : "${env}/${env.ruby.gemPath}"
|
|
|
|
--set DISABLE_BUNDLER_SETUP 1
|
|
|
|
)
|
2019-05-03 11:48:14 +01:00
|
|
|
# --prefix GIO_EXTRA_MODULES : "$prefix/lib/gio/modules"
|
2017-05-18 01:47:45 +01:00
|
|
|
|
|
|
|
mkdir -p $out/share/mikutter $out/share/applications
|
|
|
|
ln -sv $out/core/skin $out/share/mikutter/skin
|
|
|
|
substituteAll ${./mikutter.desktop} $out/share/applications/mikutter.desktop
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
mv $out/bin/.mikutter-wrapped $out/mikutter.rb
|
|
|
|
substituteInPlace $out/bin/mikutter \
|
|
|
|
--replace "$out/bin/.mikutter-wrapped" "$out/mikutter.rb"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "An extensible Twitter client";
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = https://mikutter.hachune.net;
|
2017-05-18 01:47:45 +01:00
|
|
|
platforms = ruby.meta.platforms;
|
|
|
|
license = licenses.mit;
|
2019-12-25 15:57:58 +00:00
|
|
|
broken = true;
|
2017-05-18 01:47:45 +01:00
|
|
|
};
|
|
|
|
}
|