(use-modules (gnu packages haskell-xyz) (gnu packages haskell-web) (guix build-system haskell) (guix download) (guix gexp) (guix git-download) (guix licenses) (guix packages) (loom packages sjw)) (let ((%source-dir (dirname (current-filename))) (ghc-template (load "ghc-template.scm"))) (package (name "hablo") (version "devel") (source (local-file %source-dir #:recursive? #t #:select? (git-predicate %source-dir))) (build-system haskell-build-system) (propagated-inputs (list sjw-unitjs)) (inputs (list ghc-aeson ghc-attoparsec ghc-lucid ghc-optparse-applicative ghc-parsec ghc-random ghc-sjw ghc-template ghc-xdg-basedir)) (arguments `(#:phases (modify-phases %standard-phases (add-after 'install 'copy-static-resources (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (copy-recursively "share" (string-append out "/share/hablo")))))))) (native-search-paths (list (search-path-specification (variable "SJW_PATH") (files '("lib/SJW"))) (search-path-specification (variable "XDG_DATA_DIRS") (files '("share"))))) (home-page "https://git.marvid.fr/Tissevert/SJW") (synopsis "The Simple Javascript Wrench") (description "SJW is a very simple tool to pack several JS modules into a single script. It doesn't really do proper compilation work (yet) except resolving the modules dependencies and detecting import loops but it provides each module with an independent execution context in the resulting script.") (license gpl3+)))