[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help defining a trivial package.

From: Pierre-Henry F.
Subject: Help defining a trivial package.
Date: Fri, 23 Aug 2019 19:42:56 +0000


Would someone help defining a trivial package?


    …/releases$ tree


    ├── release_1.tar.lz

    ├── release_2.tar.lz

    └── release_3.tar.lz

    …/release_3$ tree


    ├── bin

    │   └── program

    └── src


    …/release_3$ cat ./bin/program

    #! /usr/bin/env bash


    script_dir="$(dirname $script_path)"

    python3 "$script_dir/../src/"

    …/release_3$ ./bin/program

    Hello world!

Defining this package would mean:

  1. download the release_3.tar.lz

  2. uncompress release_3.tar.lz

  3. add ~…/release_3/bin~ to the path

     - where ~…~ is the path in the store


expected conclusion:

  $ which program


  $ program

  Hello World!

Here is an attempt at defining the package (incomplete, does not work) in 

    (define-module (blog)

      #:use-module (guix packages)

      #:use-module (guix download)

      #:use-module (guix build-system trivial)

      #:use-module (guix licenses)

      #:use-module (gnu packages python))

    (define-public blog


        (name "blog")

        (version "3")



            (method url-fetch)

            (uri (string-append "/home/phf/programs/blog/release_" version 




        (build-system trivial-build-system)


          '(#:builder #~(begin

                          (mkdir #$output)

                          (chdir #$output)



        (inputs `(("python" ,python)))

        (synopsis "Guix 'hello world' to learn about Guix")

        (license gpl3+)))

Here is the line that I use to try to build and debug along the way:

    $ guix build --keep-failed --verbosity=2 --file=./blog.scm

Thank you for your answers !


reply via email to

[Prev in Thread] Current Thread [Next in Thread]