(native-inputs `( ("foobar" ,(origin (method git-fetch) (uri (git-reference (url "https://foo/bar") (commit (string-append "v" version)))) (file-name (git-file-name "foo" version)) (sha256 (base32 "0i7gh99w4mi0hdv16261jcdiqyv1nkjdcwy9prw32s0lvplx8fdy"))))) then in a phase: (copy-recursively (assoc-ref native-inputs "foobar") target) (if it's from git)