nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5}:
6
7stdenv.mkDerivation rec {
8 pname = "stm32flash";
9 version = "0.7";
10
11 src = fetchurl {
12 url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
13 sha256 = "sha256-xMnNi+x52mOxEdFXE+9cws2UfeykEdNdbjBl4ifcQUo=";
14 };
15
16 buildFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
17
18 installPhase = ''
19 # Manually copy, make install copies to /usr/local/bin
20 mkdir -pv $out/bin/
21 cp stm32flash $out/bin/
22 '';
23
24 meta = {
25 description = "Open source flash program for the STM32 ARM processors using the ST bootloader";
26 mainProgram = "stm32flash";
27 homepage = "https://sourceforge.net/projects/stm32flash/";
28 license = lib.licenses.gpl2;
29 platforms = lib.platforms.all; # Should work on all platforms
30 maintainers = [ ];
31 };
32}