about summary refs log tree commit diff
path: root/tools/nixery/popcount
diff options
context:
space:
mode:
Diffstat (limited to 'tools/nixery/popcount')
-rw-r--r--tools/nixery/popcount/default.nix14
1 files changed, 6 insertions, 8 deletions
diff --git a/tools/nixery/popcount/default.nix b/tools/nixery/popcount/default.nix
index 4a3c8faf9c36..bd695380cf0b 100644
--- a/tools/nixery/popcount/default.nix
+++ b/tools/nixery/popcount/default.nix
@@ -12,15 +12,13 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{ go, stdenv }:
+{ buildGoPackage }:
 
-stdenv.mkDerivation {
+buildGoPackage {
   name = "nixery-popcount";
 
-  buildInputs = [ go ];
-  phases = [ "buildPhase" ];
-  buildPhase = ''
-    mkdir -p $out/bin
-    go build -o $out/bin/popcount ${./popcount.go}
-  '';
+  src = ./.;
+
+  goPackagePath = "github.com/google/nixery/popcount";
+  doCheck = true;
 }