diff --git a/pkgs/development/libraries/wxsqlite3/default.nix b/pkgs/by-name/wx/wxsqlite3/package.nix similarity index 60% rename from pkgs/development/libraries/wxsqlite3/default.nix rename to pkgs/by-name/wx/wxsqlite3/package.nix index d2c019b43ae2..c88d1b68cab4 100644 --- a/pkgs/development/libraries/wxsqlite3/default.nix +++ b/pkgs/by-name/wx/wxsqlite3/package.nix @@ -3,38 +3,29 @@ stdenv, fetchFromGitHub, autoreconfHook, - wxGTK, + wxGTK32, sqlite, - Cocoa, - setfile, - rez, - derez, }: stdenv.mkDerivation rec { pname = "wxsqlite3"; - version = "4.9.12"; + version = "4.10.0"; src = fetchFromGitHub { owner = "utelle"; repo = "wxsqlite3"; rev = "v${version}"; - hash = "sha256-WiOAF1yg18W4Vyyy+rzRe87GQTemvn32bexit4M/HjE="; + hash = "sha256-1U8UF5FYKoigOLDMq1/nlchAdb8NeJhC6JluFDWNQ2M="; }; - nativeBuildInputs = [ autoreconfHook ]; + nativeBuildInputs = [ + autoreconfHook + ]; - buildInputs = - [ - sqlite - wxGTK - ] - ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ - Cocoa - setfile - rez - derez - ]; + buildInputs = [ + sqlite + wxGTK32 + ]; meta = with lib; { homepage = "https://utelle.github.io/wxsqlite3/"; diff --git a/pkgs/by-name/wx/wxsqliteplus/package.nix b/pkgs/by-name/wx/wxsqliteplus/package.nix new file mode 100644 index 000000000000..8a64e7fec2b8 --- /dev/null +++ b/pkgs/by-name/wx/wxsqliteplus/package.nix @@ -0,0 +1,58 @@ +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + pkg-config, + makeWrapper, + wxGTK32, + wxsqlite3, + sqlite, +}: + +stdenv.mkDerivation rec { + pname = "wxsqliteplus"; + version = "0.4.0"; + + src = fetchFromGitHub { + owner = "guanlisheng"; + repo = "wxsqliteplus"; + rev = "v${version}"; + hash = "sha256-gyH1Wlmg9xQy7xm7rhKZa7BFTFFN4JQHp3CHmzMkVOg="; + }; + + nativeBuildInputs = [ + cmake + pkg-config + makeWrapper + ]; + + buildInputs = [ + wxGTK32 + wxsqlite3 + sqlite + ]; + + cmakeFlags = [ + "-DWXSQLITE3_HAVE_CODEC=1" + ]; + + installPhase = + lib.optionalString stdenv.hostPlatform.isDarwin '' + mkdir -p $out/{Applications,bin} + mv wxSQLitePlus.app $out/Applications + makeWrapper $out/{Applications/wxSQLitePlus.app/Contents/MacOS,bin}/wxSQLitePlus + '' + + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' + install -Dm755 wxSQLitePlus $out/bin/wxSQLitePlus + ''; + + meta = with lib; { + description = "Simple SQLite database browser built with wxWidgets"; + mainProgram = "wxSQLitePlus"; + homepage = "https://github.com/guanlisheng/wxsqliteplus"; + license = licenses.gpl3Plus; + maintainers = [ ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/development/libraries/wxsqliteplus/default.nix b/pkgs/development/libraries/wxsqliteplus/default.nix deleted file mode 100644 index 4b02de59fadb..000000000000 --- a/pkgs/development/libraries/wxsqliteplus/default.nix +++ /dev/null @@ -1,66 +0,0 @@ -{ - lib, - stdenv, - fetchFromGitHub, - wxGTK, - wxsqlite3, - sqlite, - Cocoa, - setfile, -}: - -stdenv.mkDerivation rec { - pname = "wxsqliteplus"; - version = "0.3.6"; - - src = fetchFromGitHub { - owner = "guanlisheng"; - repo = "wxsqliteplus"; - rev = "v${version}"; - sha256 = "0mgfq813pli56mar7pdxlhwjf5k10j196rs3jd0nc8b6dkzkzlnf"; - }; - - postPatch = '' - sed -i '/WX_CLEAR_ARRAY/s/$/;/' src/{createtable,sqlite3table}.cpp - ''; - - buildInputs = [ - wxGTK - wxsqlite3 - sqlite - ] ++ lib.optional stdenv.hostPlatform.isDarwin Cocoa; - - makeFlags = - [ - "LDFLAGS=-L${wxsqlite3}/lib" - ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - "SETFILE=${setfile}/bin/SetFile" - ]; - - preBuild = '' - sed -i -e 's|all: $(LIBPREFIX)wxsqlite$(LIBEXT)|all: |g' Makefile - sed -i -e 's|wxsqliteplus$(EXEEXT): $(WXSQLITEPLUS_OBJECTS) $(LIBPREFIX)wxsqlite$(LIBEXT)|wxsqliteplus$(EXEEXT): $(WXSQLITEPLUS_OBJECTS) |g' Makefile - sed -i -e 's|-lwxsqlite |-lwxcode_${ - if stdenv.hostPlatform.isDarwin then "osx_cocoau_wxsqlite3-3.2.0" else "gtk3u_wxsqlite3-3.2" - } |g' Makefile - ''; - - installPhase = - '' - install -D ${lib.optionalString stdenv.hostPlatform.isDarwin "wxsqliteplus.app/Contents/MacOS/"}wxsqliteplus $out/bin/wxsqliteplus - '' - + lib.optionalString stdenv.hostPlatform.isDarwin '' - mkdir -p $out/Applications - mv wxsqliteplus.app $out/Applications/ - ''; - - meta = with lib; { - description = "Simple SQLite database browser built with wxWidgets"; - mainProgram = "wxsqliteplus"; - homepage = "https://github.com/guanlisheng/wxsqliteplus"; - license = licenses.gpl3Plus; - maintainers = [ ]; - platforms = platforms.unix; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e00b572d113d..0455a2e6c269 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18234,18 +18234,6 @@ with pkgs; openssl = openssl_1_1; }; - wxsqlite3 = callPackage ../development/libraries/wxsqlite3 { - wxGTK = wxGTK32; - inherit (darwin.apple_sdk.frameworks) Cocoa; - inherit (darwin.stubs) setfile rez derez; - }; - - wxsqliteplus = callPackage ../development/libraries/wxsqliteplus { - wxGTK = wxGTK32; - inherit (darwin.apple_sdk.frameworks) Cocoa; - inherit (darwin.stubs) setfile; - }; - xhyve = callPackage ../applications/virtualization/xhyve { inherit (darwin.apple_sdk.frameworks) Hypervisor vmnet; inherit (darwin.apple_sdk.libs) xpc;