;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2019 Julien Lepiller ;;; Copyright © 2019 Tobias Geerinckx-Rice ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu packages poedit) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages) #:use-module (guix packages) #:use-module (guix git-download) #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (gnu packages autotools) #:use-module (gnu packages boost) #:use-module (gnu packages enchant) #:use-module (gnu packages gettext) #:use-module (gnu packages gtk) #:use-module (gnu packages icu4c) #:use-module (gnu packages pkg-config) #:use-module (gnu packages rdf) #:use-module (gnu packages wxwidgets) #:use-module (gnu packages xml)) (define-public poedit (package (name "poedit") (version "2.2.4") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/vslavik/poedit") (commit (string-append "v" version "-oss")))) (file-name (git-file-name name version)) (sha256 (base32 "147jiiab4n0nbhzp1vw1jn8ykhy7qh6zf02654ppi0imdfvfnjss")) (modules '((guix build utils))) (snippet '(begin (delete-file-recursively "deps") #t)))) (build-system gnu-build-system) (arguments `(#:configure-flags (list (string-append "--with-boost-libdir=" (assoc-ref %build-inputs "boost") "/lib")))) (native-inputs (list autoconf automake gettext-minimal pkg-config)) (inputs (list boost enchant gtk+ gtkspell3 icu4c lucene++ pugixml wxwidgets)) (home-page "https://poedit.net/") (synopsis "Gettext catalog editing tool") (description "Poedit is a GUI frontend to the GNU gettext utilities and a catalog editor/source code parser. It helps with translating applications into other languages.") (license license:expat))) class='msg-avail'>...Previously, store items registered in the database by this code (for instance, store items retrieved by 'guix offload' and passed to 'restore-file-set') would have an mtime of 0 instead of 1. This would cause problems for things like .go files: Guile would consider them to be older than the corresponding .scm file, and consequently it would ignore them and possibly use another (incorrect) .go file. Reported by Ricardo Wurmus. * guix/store/database.scm (reset-timestamps): Pass 1, not 0, to 'utime'. * tests/store-database.scm ("register-path"): Check the mtime of FILE and REF. Ludovic Courtès 2018-06-14store: Remove 'register-path'....* guix/store.scm (register-path): Remove. * guix/nar.scm: Use (guix store database). * guix/scripts/system.scm: Likewise. * tests/store-database.scm: Remove #:hide (register-path). * tests/store.scm ("register-path"): Remove. Ludovic Courtès 2018-06-14database: 'sqlite-register' takes a database, not a file name....* guix/store/database.scm (sqlite-register): Remove #:db-file and add 'db' parameter. Remove #:schema and 'parameterize'. (register-path): Wrap 'sqlite-register' call in 'with-database' and in 'parameterize'. * tests/store-database.scm ("new database") ("register-path with unregistered references"): Adjust accordingly. Ludovic Courtès 2018-06-14database: Fail registration when encountering unregistered references....* guix/store/database.scm (add-reference-sql): Remove nested SELECT. (add-references): Expect REFERENCES to be a list of ids. (sqlite-register): Call 'path-id' for each of REFERENCES and pass it to 'add-references'. * tests/store-database.scm ("register-path with unregistered references"): New test. Ludovic Courtès 2018-06-14database: 'with-database' can now initialize new databases....* nix/libstore/schema.sql: Rename to... * guix/store/schema.sql: ... this. * Makefile.am (nobase_dist_guilemodule_DATA): Add it. * nix/local.mk (%D%/libstore/schema.sql.hh): Adjust accordingly. * guix/store/database.scm (sql-schema): New variable. (sqlite-exec, initialize-database, call-with-database): New procedures. (with-database): Rewrite in terms of 'call-with-database'. * tests/store-database.scm ("new database"): New test. * guix/self.scm (compiled-guix)[*core-modules*]: Add 'schema.sql' to #:extra-files. Ludovic Courtès 2018-06-01Add (gnu store database)....* guix/config.scm.in (%store-database-directory): New variable. * guix/store/database.scm: New file. * tests/store-database.scm: New file. * Makefile.am (STORE_MODULES): New variable. (MODULES, MODULES_NOT_COMPILED): Adjust accordingly. (SCM_TESTS) [HAVE_GUILE_SQLITE3]: Add tests/store-database.scm. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Caleb Ristvedt