[bug#34989] Add emacs-counsel-projectile

Message ID CAAc=MExcwWKsWOM6HDGWbFpUyQ5pRsztODnKh_EJxKs6aVudnA@mail.gmail.com
State Accepted
Headers show
Series [bug#34989] Add emacs-counsel-projectile | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed

Commit Message

Brian Leung March 25, 2019, 6:07 a.m. UTC
See attached.

Comments

Oleg Pykhalov March 28, 2019, 8:02 p.m. UTC | #1
Hello Brian,

Guix shows me a different hash for 0.3.0 branch.  Is it OK?
--8<---------------cut here---------------start------------->8---
oleg@guixsd ~/src$ ./pre-inst-env guix build -S emacs-counsel-projectile
;;; note: source file /home/oleg/src/guix/gnu/packages/emacs-xyz.scm
;;;       newer than compiled /home/oleg/src/guix/gnu/packages/emacs-xyz.go
;;; note: source file /home/oleg/src/guix/gnu/packages/emacs-xyz.scm
;;;       newer than compiled /run/current-system/profile/lib/guile/2.2/site-ccache/gnu/packages/emacs-xyz.go
The following derivation will be built:
   /gnu/store/3dcdfi2c45n89c5ybpj6y7swf5qvzybd-emacs-counsel-projectile-0.3.0-checkout.drv
building /gnu/store/3dcdfi2c45n89c5ybpj6y7swf5qvzybd-emacs-counsel-projectile-0.3.0-checkout.drv...
environment variable `PATH' set to `/gnu/store/q09sy224qnxrp982z4xfaxi19721mjx8-gzip-1.9/bin:/gnu/store/ipx79bfj2mrc8npj7s3qi3zri11jfhaw-tar-1.30/bin'
Initialized empty Git repository in /gnu/store/8y2h0bn5pfqf5y90qdv7kpqmxxwn08yb-emacs-counsel-projectile-0.3.0-checkout/.git/
From https://github.com/ericdanan/counsel-projectile
 * tag               0.3.0      -> FETCH_HEAD
Note: checking out 'FETCH_HEAD'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at d64e527 Release 0.3.0
r:sha256 hash mismatch for /gnu/store/8y2h0bn5pfqf5y90qdv7kpqmxxwn08yb-emacs-counsel-projectile-0.3.0-checkout:
  expected hash: 1a29f16m463d4jsd1m071483vhq3589djdq47mw800844n20irbd
  actual hash:   1inc4ndl0ysfwvxk4avbgpj4qi9rc93da6476a5c81xmwpsv8wmq
hash mismatch for store item '/gnu/store/8y2h0bn5pfqf5y90qdv7kpqmxxwn08yb-emacs-counsel-projectile-0.3.0-checkout'
build of /gnu/store/3dcdfi2c45n89c5ybpj6y7swf5qvzybd-emacs-counsel-projectile-0.3.0-checkout.drv failed
View build log at '/var/log/guix/drvs/3d/cdfi2c45n89c5ybpj6y7swf5qvzybd-emacs-counsel-projectile-0.3.0-checkout.drv.bz2'.
guix build: error: build of `/gnu/store/3dcdfi2c45n89c5ybpj6y7swf5qvzybd-emacs-counsel-projectile-0.3.0-checkout.drv' failed

oleg@guixsd ~/src$ git -C /tmp clone -b 0.3.0 https://github.com/ericdanan/counsel-projectile
Cloning into 'counsel-projectile'...
remote: Enumerating objects: 19, done.        
remote: Counting objects: 100% (19/19), done.        
remote: Compressing objects: 100% (13/13), done.        
remote: Total 568 (delta 10), reused 15 (delta 6), pack-reused 549        
Receiving objects: 100% (568/568), 244.61 KiB | 505.00 KiB/s, done.
Resolving deltas: 100% (356/356), done.
Note: checking out 'd64e5275c578a494102852c466a3696bde466739'.
[…]

oleg@guixsd ~/src$ guix hash -rx /tmp/counsel-projectile/guix
1inc4ndl0ysfwvxk4avbgpj4qi9rc93da6476a5c81xmwpsv8wmq
--8<---------------cut here---------------end--------------->8---

Oleg.
Oleg Pykhalov March 30, 2019, 2:13 p.m. UTC | #2
Brian Leung <bkleung89@gmail.com> writes:

> Sorry about that. I've updated the patch file with the hash you got and can
> confirm it works for me.

No problem, thank you. Pushed to master as
29a9eb9e1a958414aae902dbb96fe01e90d2de89

It was a little bit hard for me to apply. Please, make sure you on clean
branch before prepare a patch. If you don't want to recompile Guile
Object (.go) files after checkout, I could recommend a Git worktree.

In case you want to prepare a patch series (e.g. multiple Emacs
packages), to apply them easily you could send all patches at once to
one bug report created in advance as mentioned in
https://www.gnu.org/software/guix/manual/html_node/Submitting-Patches.html

Regards,
Oleg.

Patch

From e5c8c7112e1e56cd5c9eb3cda1948cfc8ca51edf Mon Sep 17 00:00:00 2001
From: Brian Leung <bkleung89@gmail.com>
Date: Mon, 25 Mar 2019 07:06:08 +0100
Subject: [PATCH] gnu: Add emacs-counsel-projectile.

* gnu/packages/emacs-xyz.scm (emacs-counsel-projectile): New variable.
---
 gnu/packages/emacs-xyz.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 0f040b2b07..a9e4bcedc3 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -4158,6 +4158,30 @@  The purpose of this library is to wrap all the quirks and hassle of
 @code{package.el} into a sane API.")
     (license license:gpl3+)))
 
+(define-public emacs-counsel-projectile
+  (package
+    (name "emacs-counsel-projectile")
+    (version "0.3.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/ericdanan/counsel-projectile")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1a29f16m463d4jsd1m071483vhq3589djdq47mw800844n20irbd"))))
+    (build-system emacs-build-system)
+    (propagated-inputs
+     `(("emacs-ivy" ,emacs-ivy)
+       ("emacs-projectile" ,emacs-projectile)))
+    (home-page "https://github.com/ericdanan/counsel-projectile")
+    (synopsis "Enhance Projectile with Ivy")
+    (description
+     "This package uses Ivy to provide additional actions for Projectile
+commands and replacements for existing functions.")
+    (license license:gpl3+)))
+
 (define-public emacs-queue
   (package
     (name "emacs-queue")
-- 
2.21.0