guix-devel
[Top][All Lists]
Advanced

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

Re: bug? also [PATCH] Add snap-aligner.


From: Ricardo Wurmus
Subject: Re: bug? also [PATCH] Add snap-aligner.
Date: Thu, 10 Dec 2015 16:54:57 +0100

Ben Woodcroft <address@hidden> writes:

> I tried doing the check for reproducibility
> $ ./pre-inst-env guix build --rounds=3 snap-aligner
> but it only built once.
>
> $ ./pre-inst-env guix build --check snap-aligner
> ;;; note: source file /home/ben/git/guix/gnu/packages/bioinformatics.scm
> ;;;       newer than compiled 
> /home/ben/git/guix/gnu/packages/bioinformatics.go
> guix build: error: build failed: unsupported build mode
>
> Did I mess that up?

Have you restarted the daemon?  Is it the latest version of the daemon?
It works for me after restarting the daemon.

> +(define-public snap-aligner
> +  (package
> +    (name "snap-aligner")
> +    (version "1.0beta.18")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append
> +                    "https://github.com/amplab/snap/archive/v";
> +                    version ".tar.gz"))
> +              (sha256
> +               (base32
> +                "1vnsjwv007k1fl1q7d681kbwn6bc66cgw6h16hym6gvyy71qv2ly"))
> +              (file-name (string-append name "-" version ".tar.gz"))))

Nit pick: I think it’s nicer to have “file-name” right after the
offending “uri” expression.

> +    (build-system gnu-build-system)
> +    (arguments
> +     '(#:phases
> +       (modify-phases %standard-phases
> +         (delete 'configure)
> +         (replace 'check (lambda _ (zero? (system* "./unit_tests"))))
> +         (replace 'install
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let* ((out (assoc-ref outputs "out"))
> +                    (bin (string-append out "/bin")))
> +               (mkdir-p bin)
> +               (copy-file "snap-aligner"
> +                          (string-append bin "/snap-aligner"))
> +               (copy-file "SNAPCommand"
> +                          (string-append bin "/SNAPCommand"))))))))

Instead of “copy-file” (which requires repeating the target file name)
you can use this:

  (install-file "SNAPCommand" bin)

> +    (native-inputs
> +     `(("zlib" ,zlib)))
> +    (home-page "http://snap.cs.berkeley.edu/";)
> +    (synopsis "Short read DNA sequence aligner")
> +    (description
> +     "SNAP is a fast and accurate aligner for short DNA reads.  It is
> +optimized for modern read lengths of 100 bases or higher, and takes advantage
> +of these reads to align data quickly through a hash-based indexing scheme.")
> +    (license license:asl2.0)))
> +

The rest looks good to me.  Thanks!

~~ Ricardo



reply via email to

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