Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 972ae117c679
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f646d1c80d64
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Aug 3, 2019

  1. smartgithg: 18.2.4 -> 18.2.9

    Refactored packages:
      * adds makeDesktopItem and remove install_freedesktop_items
      * replaced buildCommand with preFixup & installPhase
      * replaces makeWrapper with wrapGAppsHook
    megheaiulian committed Aug 3, 2019
    Copy the full SHA
    c089c15 View commit details

Commits on Aug 4, 2019

  1. Merge pull request #65473 from plumelo/feature/smartgithg

    smartgithg: 18.2.4 -> 18.2.9
    worldofpeace authored Aug 4, 2019
    Copy the full SHA
    f646d1c View commit details
Showing with 69 additions and 54 deletions.
  1. +69 −43 pkgs/applications/version-management/smartgithg/default.nix
  2. +0 −11 pkgs/applications/version-management/smartgithg/install_freedesktop_items.sh
112 changes: 69 additions & 43 deletions pkgs/applications/version-management/smartgithg/default.nix
Original file line number Diff line number Diff line change
@@ -1,64 +1,90 @@
{ stdenv, fetchurl, lib, makeWrapper
, substituteAll
{ stdenv
, fetchurl
, makeDesktopItem
, jre
, gtk2, glib
, gtk3
, glib
, gnome3
, wrapGAppsHook
, hicolor-icon-theme
, libXtst
, which
}:

stdenv.mkDerivation rec {
name = "smartgithg-${version}";
version = "18.2.4";
pname = "smartgithg";
version = "18.2.9";

src = fetchurl {
url = "https://www.syntevo.com/downloads/smartgit/smartgit-linux-${builtins.replaceStrings [ "." ] [ "_" ] version}.tar.gz";
sha256 = "0ch6vcvndn1fpx05ym9yp2ssfw2af6ac0pw8ssvjkc676zc0jr73";
sha256 = "0d08awb2s3w1w8n8048abw2x4wnqhfx96sls9kdsnxj0xrszgz67";
};

nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [ wrapGAppsHook ];

buildInputs = [ jre ];
buildInputs = [ jre gnome3.adwaita-icon-theme hicolor-icon-theme gtk3 ];

buildCommand = let
pkg_path = "$out/${name}";
bin_path = "$out/bin";
install_freedesktop_items = substituteAll {
inherit (stdenv) shell;
isExecutable = true;
src = ./install_freedesktop_items.sh;
};
runtime_paths = lib.makeBinPath [
jre
#git mercurial subversion # the paths are requested in configuration
which
];
runtime_lib_paths = lib.makeLibraryPath [
gtk2 glib
libXtst
];
in ''
tar xvzf $src
mkdir -pv $out
mkdir -pv ${pkg_path}
# unpacking should have produced a dir named 'smartgit'
cp -a smartgit/* ${pkg_path}
# prevent using packaged jre
rm -r ${pkg_path}/jre
mkdir -pv ${bin_path}
jre=${jre.home}
makeWrapper ${pkg_path}/bin/smartgit.sh ${bin_path}/smartgit \
--prefix PATH : ${runtime_paths} \
--prefix LD_LIBRARY_PATH : ${runtime_lib_paths} \
preFixup = with stdenv.lib; ''
gappsWrapperArgs+=( \
--prefix PATH : ${makeBinPath [ jre which ]} \
--prefix LD_LIBRARY_PATH : ${makeLibraryPath [
gtk3
glib
libXtst
]} \
--prefix JRE_HOME : ${jre} \
--prefix JAVA_HOME : ${jre} \
--prefix SMARTGITHG_JAVA_HOME : ${jre}
sed -i '/ --login/d' ${pkg_path}/bin/smartgit.sh
patchShebangs $out
cp ${bin_path}/smartgit ${bin_path}/smartgithg
--prefix SMARTGITHG_JAVA_HOME : ${jre} \
) \
'';

installPhase = ''
runHook preInstall
sed -i '/ --login/d' bin/smartgit.sh
mkdir -pv $out/{bin,share/applications,share/icons/hicolor/scalable/apps/}
cp -av ./{dictionaries,lib} $out/
cp -av bin/smartgit.sh $out/bin/smartgit
ln -sfv $out/bin/smartgit $out/bin/smartgithg
cp -av $desktopItem/share/applications/* $out/share/applications/
for icon_size in 32 48 64 128 256; do
path=$icon_size'x'$icon_size
icon=bin/smartgit-$icon_size.png
mkdir -p $out/share/icons/hicolor/$path/apps
cp $icon $out/share/icons/hicolor/$path/apps/smartgit.png
done
${install_freedesktop_items} "${pkg_path}/bin" "$out"
cp -av bin/smartgit.svg $out/share/icons/hicolor/scalable/apps/
runHook postInstall
'';

desktopItem = with stdenv.lib; makeDesktopItem rec {
name = "smartgit";
exec = "smartgit";
comment = meta.description;
icon = "smartgit";
desktopName = "SmartGit";
categories = concatStringsSep ";" [
"Application"
"Development"
"RevisionControl"
];
mimeType = concatStringsSep ";" [
"x-scheme-handler/git"
"x-scheme-handler/smartgit"
"x-scheme-handler/sourcetree"
];
startupNotify = "true";
extraEntries = ''
Keywords=git
StartupWMClass=${name}
Version=1.0
Encoding=UTF-8
'';
};

meta = with stdenv.lib; {
description = "GUI for Git, Mercurial, Subversion";
homepage = http://www.syntevo.com/smartgit/;

This file was deleted.